Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Check Box works like Radio Button

Avatar

Former Community Member
How can I create a group of check boxes to act like a group of radio buttons? For instance, a yes/no checkbox that when one is selected, the other is automatically unselected.



Or perhaps there is a way to change the circle of a radio button to a square?
9 Replies

Avatar

Former Community Member
You are better off using radio buttons for this. You can change the appearance of the buttons from circles to squares from the Object Palette, Field Tab for the individual Radio Buttons. Change the Appearance to sunken or solid square from whatever is selected as the default.

Avatar

Former Community Member
Thank you! Exactly what I was looking for.



I have been through a few other forums where everyone was saying to add scripts...yikes! I'm glad I found a place where people know their stuff!

Avatar

Former Community Member
Hi Bogey,



I you want to use Checkboxes, you name the checkboxes all the same name and the make their export values different... export value you will get in the options tab.



Regards,



Chris Fourie

www.intelliform.co.za

Avatar

Former Community Member
One of the reasons why people use scripts to make checkboxes act like radio buttons is to have another object's presence change when a choice is made. The entire exclusion group was treated as a single object so you couldn't fire another script based on a radio button choice.

Avatar

Former Community Member
David,

That is incorrect. You can have scripts run based on a radio button group selection. In the change event for the radio button group you can put the following javascript code (assuming your radio button group has three radio buttons with the binding set to 1, 2, 3):



if(rdoGroup.rawValue == 1)

{

field1.presence = "visible";

}

else if(rdoGroup.rawValue == 2)

{

field1.presence = "hidden";

}

else if(rdoGroup.rawValue == 3)

{

field1.presence = "visible";

}



As long as you are evaluating based on the binding value for a radio button group you can run scripts based on the radio button selection.

Avatar

Former Community Member
can you explain the export value process for the check boxes?

Avatar

Former Community Member
Layla,

I'm not quite sure what you mean by the export value process for the check boxes.

Avatar

Level 1
Hi Kyle,



You may fine this article helpful-



http://www.acrobatusers.com/tutorials/2007/js_radio_check_box/



There is a link to an example LCD PDF with code for examination, as well as a description about export values in the text.



Hope this helps,



Dimitri

Windjack Solutions

www.windjack.com

Avatar

Former Community Member
Dimitri,

I guess my question for Layla was a little vague, but I wasn't quite sure what she was asking (as her question was quite vague). This topic had been discussing the use of radio buttons to control functionality within a form, and since I had added a comment the other day (while looking for an answer to a separate issue) to correct David's statement I noticed shortly there after Layla had posted her question. I didn't know what exactly she was asking, and just wanted some clarification.