How do you send a form back to its original state (the state in which it opens)? My form has subforms which are made visible or hidden based on user selection. The canned reset button just resets the input data but does not hide/show fields that are visible/invisible due to user interaction.
I don't know the command for re-initializing the form and a quick search turned up nothing.
Solved! Go to Solution.
Views
Replies
Total Likes
Try a button with xfa.host.resetData(); and xfa.form.remerge();
I think that gets it most of the time.
I'll usually put it with a popup warning:
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();
}
Views
Replies
Total Likes
Try a button with xfa.host.resetData(); and xfa.form.remerge();
I think that gets it most of the time.
I'll usually put it with a popup warning:
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();
}
Views
Replies
Total Likes
Hi Jono,
Thanks! That works beautifully.
Nadeem
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies