A ‘hidden’ field in InfoPath is a field that exists in the data source of the form, but that is not displayed on any view of the form. The advantage of using a ‘hidden’ field is that you can store data in the form and keep this data invisible to the user.
You can create a ‘hidden’ field on one of 2 ways:
- Drag-and-drop a text box control onto the InfoPath form template’s view. If you have not changed the default settings when you first installed InfoPath, this action will automatically add a field to the Main data source of the InfoPath form. Rename the text box control if you wish and then delete it from the view. It will still be present in the Main data source when you delete it from the view, but will be ‘hidden’ from the user.
- Go to the Data Source task pane, right-click the myFields (root) node, and then click Add from the context menu to add a field. The field will be present in the Main data source, but not present on any view, so effectively ‘hidden’.
A good example of a ’hidden’ field is when using helper fields in InfoPath forms as described in Master/detail across views.
May 29, 2009 Update:
I wrote and published an article showing how to create a ‘hidden’ field in a repeating table in InfoPath. And here are two practical examples of using ‘hidden’ fields in InfoPath:
- Auto-populate a repeating table in InfoPath with sequential dates
- Selecting the minimum date in an InfoPath repeating table using formulas (no code)

Comments to this post were closed 30 days after it was published.