Skip to main content
Participant
August 22, 2016
Answered

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

  • August 22, 2016
  • 1 reply
  • 900 views

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.

This topic has been closed for replies.
Correct answer try67

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;

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
August 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;

SpadeEXEAuthor
Participant
August 22, 2016

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