I have produced a form with the first page showing tick boxes for the different sections of the form. The user deselects any sections that they do not want by deselecting the tick box. This removes the associated subforms and works perfectly.
After completing the form the data is submitted to me via email (XML format) and I import the data back into the PDF form. On import, even though the tick boxes on the first page are deselected it still shows all of the subforms. The only way I can get rid of the subforms that are not required is to select and deselct each tick box again. Is there a way around this so that the tick boxes continue to work when the XML data is imported back in?
You can check the File/Form Properties/Defaults and ensure that the save scripting state changes is checked. If it still does not work then you will have to write an initilization routine to set the state of the form when it loads.
I realised I didn't have the script under 'Initialize'. It works now - thank you.