Highlighted

Programmatically setting radio button value based upon value in dropdown

New Here ,
Oct 21, 2020

Copy link to clipboard

Copied

Hello.  I have an Acrobat form with javascript that dynamically sets the values of a dropdown (dd2) based upon the selection in another dropdown (dd1).  I would like the value from dd1 to also toggle/set the value of a pair of radiobuttons.  Could someone suggest a method to do this?  Example:

Select value from dd1.  dd2 value is changed based on dd1's selected value.  Need to change the state of radio buttons (a and b) based upon value from dd1.

 

Here's a thought, and not that I know how to do this either, but would it be simpler to change the two radio buttons to a single check box that is either checked or not?

 

Thank you in advance.

TOPICS
How to, PDF forms

Views

25

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

Programmatically setting radio button value based upon value in dropdown

New Here ,
Oct 21, 2020

Copy link to clipboard

Copied

Hello.  I have an Acrobat form with javascript that dynamically sets the values of a dropdown (dd2) based upon the selection in another dropdown (dd1).  I would like the value from dd1 to also toggle/set the value of a pair of radiobuttons.  Could someone suggest a method to do this?  Example:

Select value from dd1.  dd2 value is changed based on dd1's selected value.  Need to change the state of radio buttons (a and b) based upon value from dd1.

 

Here's a thought, and not that I know how to do this either, but would it be simpler to change the two radio buttons to a single check box that is either checked or not?

 

Thank you in advance.

TOPICS
How to, PDF forms

Views

26

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
Oct 21, 2020 0
Contributor ,
Oct 21, 2020

Copy link to clipboard

Copied

It depends what you want to achive. What value would make checkbox checked?

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
Reply
Loading...
Oct 21, 2020 0
Adobe Community Professional ,
Oct 21, 2020

Copy link to clipboard

Copied

The value of a radio button group is the value of the export value of the selected button. So to set a specific radio button, the script sets the value for radio button group to a specfic export value.  Exactly the same as setting the selection on a list.

 

So set the radio button exports to be the same as the entries in the list.  If this method isn't suitable, then you'll need to setup an "if" block to convert list selections to radio button export values. 

 

 

 

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
Reply
Loading...
Oct 21, 2020 0