How do I create a collapsible section? That is, a section that can show/hide child controls, whether they are required or not. I can't use an optional section, because it requires binding.
The easiest way to do this is to this is using Conditional Formatting. Select the Section control, then pick Format | Conditional Formatting.... Add a rule where the formatting is “Hide this control”.
We often call this “conditional visibility.” Like everything in InfoPath, the view state is driven entirely by the data, so you need something in your data which maps to the expand/collapse state. One common approach is to add an attribute field to the group element the section is bound to. It shows up in your data when saved, and the expand/collapse state is saved when users save the form.
Bind a checkbox to the attribute, and you now have UI which lets the user control the state. If you prefer a button, you can create a rule which sets the value of the attribute; use two buttons with more conditional visibility rules to swap the label (e.g. between a + and a – to look like a TreeView). You can also write code which modifies the value of the attribute, and the section will show or hide.
PingBack from http://sharenotes.wordpress.com/2008/04/28/infopath-forms-minimize-andmaximize-sections-or-collapsible-sections/
In InfoPath 2010 against an existing SharePoint list, it appears I cannot add additional sections where normally in 2007 I would do exactly as you describe. I can pput more than one on the form, but the advanced view only shows one _RW section and I cannot then hide one from a form element in another.
Can I have a table in a collapsible Section? I've tried it, and it doesn't like me putting a table inside a section. I need this for proper formatting. Thanks.