So please read before answering.
I have two checkboxes in a section of my form. A question is asked and if the answer is yes, and they click the appropriate checkbox, I make one subform visible so they can input the appropriate answer for Yes. in that statement, I want to make sure the Checkbox for No becomes unchecked and the associated subform for no is hidden. Making the subform hidden is no problem but I can't figure out how to make the checkbox for No become unchecked.
And vice versa for the no checkbox. Is there a way to change the value? I have tried using ".checked = 0" in my if statement for the no Checkbox when yes is selected and ".defaultChecked = 0" and neither is recognized.
I know everyone says: "Use radio buttons." Well I neither like the look of those in the form, even making them square, nor how they appear in the form's heirarchy. It makes things to messy.
So any help out there?
Solved! Go to Solution.
Views
Replies
Total Likes
Check this link out. It gives a way of making a group of check boxes behave like radio buttons.
http://blogs.adobe.com/formfeed/2008/10/build_a_better_exclusion_group.html
Views
Replies
Total Likes
Check this link out. It gives a way of making a group of check boxes behave like radio buttons.
http://blogs.adobe.com/formfeed/2008/10/build_a_better_exclusion_group.html
Views
Replies
Total Likes
Thank you AJP!
That was perfect. I feel like I must have been in a daze this morning when I was trying to set the deselected/unchecked box to everything but "null."
Much appreciated.
Views
Replies
Total Likes
I don't really understand this...you can make them exactly the same as checkboxes.
You're worrying about things that don't matter in the greater scheme...Just trying to be helpful here, I generally don't like making more work for myself if I don't have to.
But, if you really want to make more work for yourself:
You have to set the rawValue of the checkbox to its on or off state (usually 1/0 unless it's been changed).
This would go on the first checkbox (along with your show/hide logic):
if (this.rawValue==1) {
checkbox2.rawValue=0;
}
And then you'd want the opposite on the other checkbox.
Views
Replies
Total Likes
Thanks for the input Jono. I understand your reasoning but when I was trying to make the change from checkbox to radio buttons when the problem first arose, nothing seemed to be working. All my scripts failed to execute and even using 0 didn't seem to help. Maybe a spelling error when I changed the code, don't know. Hence the question on making checkboxes mutually exclusive. I know the look of the heirarchy matters less that how the form actually works, but I just like the look.
As I mentioned before, I had to go with setting the rawValue=null for the proper result, based upon a comment from the prior poster. I guess I need to brush up on my JavaScript some more. And it is always fun to learn something new instead of going with what everyone else uses!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies