Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Reset the form

Avatar

Not applicable
I have a form that has many subforms whose instances get added or removed depending on user action.



Can we do that if I click on reset button, the form returns to its original layout. i.e it looks exactly like it was when first loaded.



Thanks
9 Replies

Avatar

Not applicable
i would really appreciate if anybody could give me a direction to work on.



thanks

Avatar

Not applicable
I don't think so.



Is the form running in Reader or in the browser? If it's in the browser, you could ask the browser to reload the form; that would start fresh.



Otherwise I think the only way would be to write some code that would remove or undo the changes you made.

--

SteveX

Adobe Systems

Avatar

Not applicable
You would have to track how many instances of each subform where present when the form was opened, and then when the button is clicked use the setInstance() method of the instanceManager on all the dynamic subforms to the value that they were at the beginning.



Chris

Adobe Enterprise Developer Support

Avatar

Not applicable
Isn't there a way where we could trigger the form:ready event somehow so that the form returns to its original layout???

Avatar

Not applicable
Marleen L wrote:

> Isn't there a way where we could trigger the form:ready event somehow so that the form returns to its original layout???



Marleen,

The easiest way to do this would probably be to clear out the data in

the Data DOM ( xfa.datasets.data ) and then remerge the data with the

form using xfa.form.remerge().

I've never actually tried this, but it seems like the easiest way to go.



Justin Klei

Cardinal Solutions Group

www.cardinalsolutions.com

Avatar

Not applicable
Justin_Klei@adobeforums.com wrote:<br />> Marleen L wrote:<br />>> Isn't there a way where we could trigger the form:ready event somehow so that the form returns to its original layout???<br />> <br />> Marleen,<br />> The easiest way to do this would probably be to clear out the data in <br />> the Data DOM ( xfa.datasets.data ) and then remerge the data with the <br />> form using xfa.form.remerge().<br />> I've never actually tried this, but it seems like the easiest way to go.<br />> <br /><br /><br />Marleen,<br /> I have tested this out and it works. Try the following code, <br />substituting 'MYFORM' with your top-level form name...<br /><br />var newXML = "<?xml version='1.0' encoding='UTF-8'?><MYFORM></MYFORM>";<br />xfa.datasets.data.loadXML(newXML,1,1);<br />xfa.form.remerge();<br /><br /><br /> Justin<br /> Cardinal Solutions Group<br /> www.cardinalsolutions.com

Avatar

Not applicable
Hi, I'm new to LiveCycle Designer and have two questions. #1: How does one include a Date/Time form field that automatically inserts the TIME only? and #2: How does one set up a form field that will take the values from two other fields and perform a calculation then enter the result?

Any help with these two questions would be greatly appreciated!