Copy link to clipboard
Copied
Thanks in advance for your help!
I have a dropdown with three options:
Yes.
No because A.
No because B.
Later in the form, I want either a "yes" checkbox automatically checked or the "no" checkbox.
I can get the "yes" to work fine, but can't get the script to use both "no" responses--it just takes one. I'm sure I'm missing something little, but don't know what. Any suggestions? Thanks!
this.getField("LEP Special Factor Response Confirm No").checkThisBox(0,event.value == "No. The child's home language is English." ? true : false);
this.getField("LEP Special Factor Response Confirm No").checkThisBox(0,event.value == "No. The child's home language is not English, but they demonstrates appropriate English proficiency." ? true : false);
this.getField("LEP Special Factor Response Confirm Yes").checkThisBox(0,event.value == "Yes. The child demonstrates limited English proficiency." ? true : false);
Copy link to clipboard
Copied
The second statement for the "No" checkbox is cancelling out the first. Change your script to
this.getField("LEP Special Factor Response Confirm No").checkThisBox(0,(event.value == "No. The child's home language is English." || event.value=="No. The child's home language is not English, but they demonstrates appropriate English proficiency.")? true: false);
this.getField("LEP Special Factor Response Confirm Yes").checkThisBox(0,event.value == "Yes. The child demonstrates limited English proficiency." ? true: false);
Copy link to clipboard
Copied
Assuming your check boxes are mutually exclusive, an easier way to write this script is to name the two checkboxes identically, with one export value as "Yes" and the other as "No". Then add Yes and No export values to the dropdown statements. Add the following custom keystroke script to the dropdown (assuming checkbox name is "Checkbox 1"):
if(!event.willCommit)
{this.getField("Checkbox 1").value=event.changeEx;}
Copy link to clipboard
Copied
Where is your script located?
Copy link to clipboard
Copied
Within the dropdown properties under Validate.
Copy link to clipboard
Copied
The second statement for the "No" checkbox is cancelling out the first. Change your script to
this.getField("LEP Special Factor Response Confirm No").checkThisBox(0,(event.value == "No. The child's home language is English." || event.value=="No. The child's home language is not English, but they demonstrates appropriate English proficiency.")? true: false);
this.getField("LEP Special Factor Response Confirm Yes").checkThisBox(0,event.value == "Yes. The child demonstrates limited English proficiency." ? true: false);
Copy link to clipboard
Copied
Thanks so much! I knew that was happening, but had no idea how to fix it. Appreciate the help!
Copy link to clipboard
Copied
Assuming your check boxes are mutually exclusive, an easier way to write this script is to name the two checkboxes identically, with one export value as "Yes" and the other as "No". Then add Yes and No export values to the dropdown statements. Add the following custom keystroke script to the dropdown (assuming checkbox name is "Checkbox 1"):
if(!event.willCommit)
{this.getField("Checkbox 1").value=event.changeEx;}
Copy link to clipboard
Copied
Great! I'll try this, too. Googling for answers sometimes finds more complicated solutions than necessary! I appreciate the help.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more