SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose a form have 5 sections where each section contain at least 8 or more fields (can be text field, drop-down list field, date picker field, etc)

May I know if it is possible to create a 'Clear' or 'Reset' button (or something similar) for each section? (This will be useful because sometime, a user after filling up a form but found that one section of the form he/she wanted to clear up and probably refill again - the user just click the 'Clear' or 'Reset' button and all the field in that particular section will be back to the original. User will not need to manually clear each field in that particular section one-by-one)

share|improve this question
up vote 2 down vote accepted

I think it can be solved with some custom code but IMO this is huge overkill.

There is also no default option to create Rule that will filter all controls/fields of one section and apply 'reset'.

However you can build Button in each section running actions 'Set field's value' for each control/field in one section. It is manual work to set it but if you don't have 'tons of controls' it is easiest solution. And of course you need to keep in mind that if you add new control/field in one section you need to update button rules by adding new action to 'reset' newly added control/field.


As requested in comments here is example on how to do it via code:

Trick: Clear or reset fields in InfoPath using only 3 lines of code

Even it looks like simple solution if you want to deploy it to SharePoint this applies:

Manage administrator-approved form templates

and that is why I stated before that using code is huge overkill.

share|improve this answer
Yes, indeed adding one action for each field just to set them to empty is really "hard" manual work even though it is the easiest solution. I was looking for something like a button that can just connect to a section and clear all the field inside the section. By the way, you mention that it can be solved with some custom code, so may I know if it is possible to share the code and probably I can do the testing of the code. Once I have tested the code (and it work), then I can quickly mark your answer as correct. – Larry Morries Sep 14 '11 at 9:25
I have edited my answer. Take a look at links I provided. – Vedran Rasol Sep 14 '11 at 9:39
Great modification of your answer. Yeah, you are right - is a huge overkill indeed. The form with just a few lines of code will require administrator to approve - can be sometime an inconvenient. I like that video ( in the link -… that you provided but still got room for improvement like - extending the video on how to insert the code into the form - would make it perfect, in my opinion. A upvote for you. – Larry Morries Sep 16 '11 at 2:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.