Copy link to clipboard
Copied
Wanting to control radio buttons associated with a text field entry, this I was able to get working thanks to some help from another thread.
The issue is that each text field has 10 radio toggles (0-9) per field, when it comes to the 4th text field the data I had originaly entered had been replaced with data from one of the previous text field entries. This in turn produced the error 'Invalid value: must be less than or equal to 0.' while testing the form. I tried searching for an answer but wasn't able to locate anything that fit my scenario.
Running this coede in each text fields Validate section
this.getField("Radio Button").value = event.value == "0" ? "Choice1" : "Off";
...
this.getField("Radio Button").value = event.value == "9" ? "Choice1" : "Off";
Perhaps there is a different/better way to tackle this?
Copy link to clipboard
Copied
What message do you get when testing it in Acrobat?
Copy link to clipboard
Copied
Actually nothing works. I am using Acrobat Pro DC so when in the preview mode none of the scripting is working but does when you open the file in a browser. When I look at the Preferences Adobe the 'Enable Acrobat JavaScript' is enabled, unless I am missing some other setting.
Copy link to clipboard
Copied
Look for errors in the Acrobat Javascript console.
Copy link to clipboard
Copied
I was able to figure out CTRL+J opens the console, however I was not able to see any errors other than the fact that the 4th column was the one giving me trouble. Must have been a syntax error I kept missing, so I reentered the data and that solved my problem.
I am not a programmer, however I am learning a lot. Thank you for your help.
Copy link to clipboard
Copied
Was able to figure it out, thank you for tour assistance.