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

Programmatically setting radio button value based upon value in dropdown

New Here ,
Oct 21, 2020 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

490

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

LATEST

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. 

 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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