reset and remerge form so it returns to original state
I'm a novice at this so I'd appreciate any help. I've done a lot of searching in forums and can't find a full answer to my problem. I have a 12 page form, mostly text fields, but also radio buttons and check boxes. I have many check boxes/radio buttons that when selected reveal a hidden text field. I want to add an option to clear the form, but when I set up a reset button using the "Reset a form" default action, it not only clears the form, but clears out the hidden form field properties and they all are visible again. I want to create a button using script to clear the form while keeping all form fields in their original state. In my searching I found this script:
var nButton = app.alert({
cMsg: "Warning: You are about to reset all data in the form. \n\nDo you want to continue?",
cTitle: "Reset Form Data",
nIcon: 1, nType: 2
});
if (nButton == 4){
xfa.host.resetData();
xfa.form.remerge();
}
I am assuming something like this will work and I know I will need to add more to it, I am just not well versed enough to know how to finish it so it works with my form. Do I simply add page numbers in to the reset and remerge sections, or is it more complicated like adding each field name, group name etc., and could someone show me an example of how it is written out?
