Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Error when submitting completed form

Avatar

Former Community Member

Hello,

I have created a form with 3 'hidden' subforms which only pop up when a box is checked off. I have set them all up so that the required fields are only required when the form is open. This works, as long as you dont enter information into the hidden form, and then close the hidden form.  I want to allow the form to erase all information (or atleast not recognize it) if the user opens the form and enters information, then realizes the information is not needed and closes the form without clearing the fields.  Is this possible?  Right now, if the information is entered in, and then the subform is closed, error messages appear when clicking the submit button.

Thank you in advance for your help.

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can clear the data in the subform by using "xfa.host.resetData("SubformName with Full Path")"

This needs to be done in the event code which closes the Subform.

Let me know if you need more help..

Thanks

Srini

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

You can clear the data in the subform by using "xfa.host.resetData("SubformName with Full Path")"

This needs to be done in the event code which closes the Subform.

Let me know if you need more help..

Thanks

Srini