Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


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

50

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

Adobe Community Professional , 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;}

Likes

Translate

Translate
Adobe Community Professional ,
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;}

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

Copy link to clipboard

Copied

LATEST

waaw,, you are hero (:

thanks aloot

 

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

Copy link to clipboard

Copied

What should happen when no choice are made?

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

Copy link to clipboard

Copied

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

😉

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
Adobe Community Professional ,
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.

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