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

Clearing out of "Null" a subform

woodalls6150930
Level 1
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
lateniteNC
Level 4
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.

Magus069
Level 10
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!