Is there a button to restore the form (dynamic/flowable) to its original state after data clearance? | Community
Skip to main content
Level 3
November 29, 2023
Solved

Is there a button to restore the form (dynamic/flowable) to its original state after data clearance?

  • November 29, 2023
  • 1 reply
  • 577 views

I'm working on a dynamic PDF form with conditional actions. For instance, if "First" is selected from the dropdown, Textfield1 appears; if "Second" is chosen, then Textfield2.

 

 

I've a "Reset" button that clears all data. However, even though the dropdown shows nothing after a reset, Textfield1/2 still on.

 

 

I know we can set the visibility, but my actual form contains a lot of object and, I don't like to add them manually.

 

Is there any function to bring my form back to its original state, where all dependent objects disappear when I hit "Reset"? Or, do I need to write the hardcoded to banish them manually?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Vijay_Katoch

Use the below code after resetData()

 

xfa.form.remerge();

1 reply

Vijay_Katoch
Community Advisor
Vijay_KatochCommunity AdvisorAccepted solution
Community Advisor
November 30, 2023

Use the below code after resetData()

 

xfa.form.remerge();