• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Clear Form Issue

Guest
Dec 15, 2016 Dec 15, 2016

Copy link to clipboard

Copied

I have a Clear Form.  I have fields that are visible only if a specific check box is checked.  If I check that check box (the hidden fields now become visible), but then I clear the form and the fields that are supposed to be hidden are still visible despite the check box not being checked anymore.  Is there anyway I can fix this? Below is the script I am using in regards to the check box.  Thank you!

var f = this.getField("Check Box 1");
if(f.isBoxChecked(0)){
    this.getField("Field 1").display = display.visible;
    this.getField("Field 2").display = display.visible;
    this.getField("Field 3").display = display.visible;
    this.getField("Field 4").display = display.visible;
    this.getField("Field 5").display = display.visible;
    this.getField("Field 6").display = display.visible;
    this.getField("Field 7").display = display.visible;
    this.getField("Field 8").display = display.visible;
}
else {

    this.getField("Field 1").display = display.hidden;

    this.getField("Field 2").display = display.hidden;

    this.getField("Field 3").display = display.hidden

    this.getField("Field 4").display = display.hidden;

    this.getField("Field 5").display = display.hidden;

    this.getField("Field 6").display = display.hidden

    this.getField("Field 7").display = display.hidden

    this.getField("Field 8").display = display.hidden

}

TOPICS
PDF forms

Views

472

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 15, 2016 Dec 15, 2016

You need to create your own Reset Form button and use it to make those

fields hidden when it's clicked, as well as actually resetting the form.

On Thu, Dec 15, 2016 at 6:16 PM, chughes919 <forums_noreply@adobe.com>

Votes

Translate

Translate
Community Expert ,
Dec 15, 2016 Dec 15, 2016

Copy link to clipboard

Copied

You need to create your own Reset Form button and use it to make those

fields hidden when it's clicked, as well as actually resetting the form.

On Thu, Dec 15, 2016 at 6:16 PM, chughes919 <forums_noreply@adobe.com>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2016 Dec 15, 2016

Copy link to clipboard

Copied

LATEST

Hi.

You should use the form field naming convention (the dot really matters):

field.1

field.2

field.3

etc.

So you will just have to use one line of JavaScript to catch all fields:

this.getField("Field").display = display.visible;

or

this.getField("Field").display = display.hidden;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines