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

Hiding Check Box

Community Beginner ,
Sep 08, 2020 Sep 08, 2020

Copy link to clipboard

Copied

I am not a javascript person and not sure this question is related to javascript.

I have a form with a row of Text Boxes.  The first box is a Check Box and when selected, the Text Boxes in the row will display (hidden if the check box is not checked).   At the end of the row, I added another Check Box that I want hidden unless the first checkbox in the row is selected.  Since there is no Calculate Section for a calculation, is there a way to accomplish this?

TOPICS
Acrobat SDK and JavaScript

Views

124

Likes

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 , Sep 08, 2020 Sep 08, 2020

If I got it right , you want, if first checkbox is checked second checkbox is visible else if first checkbox
is not checked second checkbox is hidden?
You can do it like this:
If first checkbox is unchecked set second checkbox to hidden manualy(only first time, or after you input code just check and uncheck first checkbox
to sync them) use this code as MouseUp event on first checkbox (change name of the checkbox if needed):
this.getField("CheckBox2").display = event.target.value != "Off" ? display.vi

...

Likes

Translate

Translate
Community Expert ,
Sep 08, 2020 Sep 08, 2020

Copy link to clipboard

Copied

Hi,

Can you confirm the version of the software and operating system you are using?

I think in Acrobat, this can only be done in Javascript, look at https://community.adobe.com/t5/acrobat/editing-show-hide-field-list-via-javascript/td-p/3819705?page...

I use Adobe (forms) Designer, it is much more powerfull than Acrobat for this type of development.

Let us know how you progress

Likes

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 Beginner ,
Sep 08, 2020 Sep 08, 2020

Copy link to clipboard

Copied

I am running Windows 10 2004 and Acrobat Pro DC 2020.012.20043.

 

I have the Creative Cloud Suite but do not see that program.

Likes

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 ,
Sep 08, 2020 Sep 08, 2020

Copy link to clipboard

Copied

If I got it right , you want, if first checkbox is checked second checkbox is visible else if first checkbox
is not checked second checkbox is hidden?
You can do it like this:
If first checkbox is unchecked set second checkbox to hidden manualy(only first time, or after you input code just check and uncheck first checkbox
to sync them) use this code as MouseUp event on first checkbox (change name of the checkbox if needed):
this.getField("CheckBox2").display = event.target.value != "Off" ? display.visible : display.hidden;

Likes

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 Beginner ,
Sep 08, 2020 Sep 08, 2020

Copy link to clipboard

Copied

LATEST

Thank you very much.

Likes

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