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

Use JavaScript to set radio button choice using drop down box value.

New Here ,
Aug 21, 2016 Aug 21, 2016

I'm using Adobe Acrobat Pro DC version 2015.016.20039 on a MacBook Pro OS X El Capitan version 10.11.6.

I have a set of radio box choices named CitBox. I'm trying to set which choice is selected based off of a drop-down box named AppCitizenship.  Both of them have six choices with the values of 1, 2, etc. ( I thought that having the same values would make it easier to translate from one to the other). Thanks in advance.

TOPICS
Acrobat SDK and JavaScript
831
Translate
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 , Aug 22, 2016 Aug 22, 2016

If you used the same values then it's quite easy. Just use this code as the custom validation script of the drop-down field:

this.getField("CitBox").value = event.value;

Translate
Community Expert ,
Aug 22, 2016 Aug 22, 2016

If you used the same values then it's quite easy. Just use this code as the custom validation script of the drop-down field:

this.getField("CitBox").value = event.value;

Translate
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
New Here ,
Aug 22, 2016 Aug 22, 2016
LATEST

That did the trick. I had to move the code from Validate to Calculate, but it works! Thanks.

Translate
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