Paul Galvin's (old) SharePoint space [SharePoint

Just another site

Accidentally Adding Code to an InfoPath Form; Deliberately Removing It

When working with buttons on a form, we often add rules.  You access the rules editor from the properties of the button.

When clicking around quickly, it’s easy to accidentally click on "Edit Form Code" instead of "Rules …".

The first time I did this, I canceled out of the code editor.  However, when I tried to publish the form a little while later, it required that I publish as an "Administrator-approved form template (advanced)".  I didn’t actually do any programming and I absolutely didn’t want to go through an unnecessary approval process.  I was in a bit of panic at the time due to time constraints.  To get past it, I simply restored a previous backup and continued.  I had recently seen some blog posts about people going into the form’s XML to tweak things and I was afraid I would have to do something similar.

Today, I did it again.  This time, I had a little more time on my hands and found that you can easily undo this.

Go to:

Tools -> Form Options -> Programming: "Remove Code"

It does not get much easier than that.


Technorati Tags: ,

One response to “Accidentally Adding Code to an InfoPath Form; Deliberately Removing It

  1. Chris January 11, 2008 at 6:13 pm

    I have run into this before and discovered the same button. Glad you went ahead and made it available to the community at large!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: