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

help for 2 radio group and one text box

Community Beginner ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

Hi

i have 2 radio group each one have 2 choice i need javascript to do as shown in the picture

some one help plz

radio box.png

TOPICS
Install update and subscribe to Acrobat , JavaScript , PDF forms

Views

437

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 , Jun 30, 2021 Jun 30, 2021

Ajust the orange words to match names and export values of your form and place this script as a Calculation script in the text field (Text1):

 

if (this.getField("Group1").value == "No" && this.getField("Group2").value == "No") {event.target.display = display.hidden;}
else {event.target.display = display.visible;}

Votes

Translate

Translate
Community Expert ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

Ajust the orange words to match names and export values of your form and place this script as a Calculation script in the text field (Text1):

 

if (this.getField("Group1").value == "No" && this.getField("Group2").value == "No") {event.target.display = display.hidden;}
else {event.target.display = display.visible;}

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 Beginner ,
Jul 01, 2021 Jul 01, 2021

Copy link to clipboard

Copied

LATEST

waaw,, you are hero (:

thanks aloot

 

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 ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

What should happen when no choice are made?

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 ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

"No choice" is not an option when using radio buttons.

😉

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 ,
Jun 30, 2021 Jun 30, 2021

Copy link to clipboard

Copied

What I mean is when you open file and no radio buttons are selected,should field be visible or hidden.

With your code it will be visible and it's ok if OP wants it that way, unless he wants it hidden when no choice are made.

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