Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Clearing out of "Null" a subform

Avatar

Level 1

How do I null an entire subform when that subform is selected from a drop down list.  Currently once information is entered and you click away and go back to the original subform, the information from the previous entry is on the form. Thank you in advance for your response.

2 Replies

Avatar

Level 4

Depending on the complexity of your form, different approaches may be needed, but the simple way to clear a form is to use the reset statement.

In JavaScript, use:

xfa.host.resetData("object name");

will clear any data in that object. The object can be an entire form, page, or individual object on the form.

You can use that a button (click event) or on other events, depending on what you want to do with your form.

Avatar

Level 10

Hi there,

Just for specifications, to reset data of a subform, you need to specify its full reference_syntax.

You can access the reference_syntax easily by using the property 'somExpression'

E.g.:

Hope this help!