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

clear mandatory fields when section hidden

Avatar

Level 4

Hello,

I have set up a Radio button with two options. When the user chooses option 1 another radio button comes up asking another question. The user will either choose option 1 or option 2.  If the user chooses option 1 and enters the information then changes their mind and goes back and chooses option 2 the information is still showing in the fields.  I am using the following script in the exit event for both options 'xfa.host.resetData("form.content.MailingAdd").

When the user submits the form, it does not recognize the hidden fields, but the information entered into the section still shows up on the xml code when submitted.  Is there a way to entirely clear the field when it is hidden so that the information does not come through on the xml code? 

Thank you,

Nik

0 Replies

Avatar

Level 10

You can check the presence property and clear of the data before you submit..

if(Field1.presence == "hidden")

     Field1.rawValue ="";

Thanks

Srini