Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Checkboxes in Licecyle

Not applicable
I know if you use radio button group then the user can only check one box out of whatever many is in the group. But say if your using 4 checkboxes but you want the user to be only allowed to pick one then I am assuming you have to use code. Now do you use FormCalc or Javascript? and then what is the code to do that? Basically if they click on checkbox1 then checkbox2, 3 and 4 should be blank then if they click on checkbox2 then checkbox1, 3 and 4 should be blank.
5 Replies
pguerett
Level 10
Level 10
You cna write code or an easier way is to use radiobuttons and change their appearance to look like checkboxes. In the Object Paltte under the field tab there is an appearance dropdown. Change it to a solid square and voila ....mutually exclusive checkboxes.



Hope that helps
Not applicable
This is the Javascript code I put in to test the chickboxes in the "click" event but it still does not work. This is for first CheckBox1.



document.getElementById("CheckBox2").checked=false;

document.getElementById("CheckBox3").checked=false;

document.getElementById("CheckBox4").checked=false;
Not applicable
Try the following javascript:

if(CheckBox1.rawValue ==1)

{

CheckBox2.rawValue =0

CheckBox3.rawValue =0

CheckBox4.rawValue =0

}

remember to save as dynamic pdf.



I hope this helps you.
Not applicable
Thank You Daniel this worked perfectly. I know you can use radio buttons to this but the form I was working on was very old and contained subforms within subforms and it was just a mess. When I use the radio buttons it just doesn't join them in a group so I had to use checkboxes and this code works exactly fine with the click function. Thanks again.
Not applicable
You're welcome. Glad it solved your problem.