I've been put in charge of creating a form as a whistleblower program. I need to be able to upload it to Sharepoint and after some research I learned that Infopath 2010 can do it. However, this is my first time doing this and I have absollutely no experience in either Infopath or VSTA coding.
Here's the document setup I'm using. I have the Submit button setup to use "Rules and Custom Code"

Here's what shows up in VSTA.

Again, I've never messed with this and I can only assume that this is the section I need to edit :
public void CTRL4_5_Clicked(object sender, ClickedEventArgs e)
{
// Write your code here.
}
I did some research and I was told to put in this code :
public void SubmitForm_Clicked(object sender, ClickedEventArgs e)
{
// Run the main submit as System Account
SPSecurity.RunWithElevatedPrivileges(delegate()
{
this.Submit();
});
}
However, when I did that I get a compiling code error when trying to preview the file. Any ideas, suggestions would be greatly appreciated.