Copy link to clipboard
Copied
I have four radio buttons in a group. If option one or three are selected I want to disable (and uncheck) a certain checkbox. If option two or four are selected, I want to enable that check box. I'm not sure how to do this.
Thanks
Jack
You didn't say what are names of the fields or name of radio button options so Il go with default and you change names if you need, This is one of the ways you can do it:
In each radio button -> action tab -> Mouse UP event -> Run a JavaScript add this code:
if(event.target.value == "Choice1" || event.target.value == "Choice3"){
this.getField("Check Box1").value = "Off";
this.getField("Check Box1").readonly = true;}
else if(event.target.value == "Choice2" || event.target.value == "Choice4")
this.g
...
Copy link to clipboard
Copied
You didn't say what are names of the fields or name of radio button options so Il go with default and you change names if you need, This is one of the ways you can do it:
In each radio button -> action tab -> Mouse UP event -> Run a JavaScript add this code:
if(event.target.value == "Choice1" || event.target.value == "Choice3"){
this.getField("Check Box1").value = "Off";
this.getField("Check Box1").readonly = true;}
else if(event.target.value == "Choice2" || event.target.value == "Choice4")
this.getField("Check Box1").readonly = false;
Don't forget to change names if needed.
Copy link to clipboard
Copied
Perfect. Thank you.
Copy link to clipboard
Copied
Hello,
I'm trying to adapt this to something similar. I have two radio buttons "Permanent" and "Temporary". If Permanent is selected, I would like Temporary to be disabled. Likewise, If Temporary is selected, I would like Permanent to be disabled. Can you assist with code for this?! Thanks for help!
Nikki