Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How to selectively reset content in a form

Avatar

Level 3

I have a reset button in my form to clear all user entries. I have a table with qty/price entries and corresponding fields that calculate sums etc.

I would like to add a reset button to clear only the table entries and the corresponding totals. How do I do this?

1 Accepted Solution

Avatar

Correct answer by
Level 10

You could pass the path of the field to the resetData function to selectively reset the data in the form.

  xfa.host.resetData("xfa.form.form1.Page1.Table1");

  xfa.host.resetData("xfa.form.form1.Page1.TextField1");

  OR

 

  xfa.host.resetData("xfa.form.form1.Page1.Table1,xfa.form.form1.Page1.TextField1"); // Combine multiple fields into one statement..

Thanks

Srini

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

You could pass the path of the field to the resetData function to selectively reset the data in the form.

  xfa.host.resetData("xfa.form.form1.Page1.Table1");

  xfa.host.resetData("xfa.form.form1.Page1.TextField1");

  OR

 

  xfa.host.resetData("xfa.form.form1.Page1.Table1,xfa.form.form1.Page1.TextField1"); // Combine multiple fields into one statement..

Thanks

Srini