Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Reset data back to initial values

Avatar

Former Community Member
I have a PDF that gets pre-illed with XML from a web page. The fields are editable and there is a reset button at the end of the form. What I need is if the user edits the field and then clicks Reset, the form should go back to being filled with the XML that it came populated with. Is that possible? I can reset the whole form so that all fields are cleared out, but not they get pouplated with the original XML.



Any help is highly appreciated!



Thanks
2 Replies

Avatar

Former Community Member
Any input on this is highly appreciated.



Thanks!

Avatar

Level 7
You can specify an array of fields to reset.



Syntax

$host.resetData([ STRING param ])



param (optional)

Optional list (separated by commas) of the names of all fields to reset. If not present or empty, all the fields in the form are reset to their default value.



Returns

Empty