Expand my Community achievements bar.

SOLVED

Radio Button Selection for Multifield

Avatar

Level 5

I need an identifier in tabs such that author can specify which tab will open at page load Below is my dialog.xml.

<items jcr:primaryType="cq:WidgetCollection"> <typeconfigs jcr:primaryType="cq:Widget" fieldLabel="Accordion" name="./options" xtype="customconfigmultifield"> <fieldConfigs jcr:primaryType="cq:WidgetCollection"> <option jcr:primaryType="cq:Widget" hidden="{Boolean}true" name="option_name" xtype="textfield"/> <optionval jcr:primaryType="cq:Widget" allowBlank="{Boolean}false" fieldLabel="Title" maxLength="{Long}60" name="optionval" xtype="textfield"/> <openaccordion jcr:primaryType="cq:Widget" name="selectaccordion" type="radio" xtype="selection"> <options jcr:primaryType="cq:WidgetCollection"> <one jcr:primaryType="nt:unstructured" text="Open at Page Load" value="in"/> </options> </openaccordion> </fieldConfigs> <limit jcr:primaryType="nt:unstructured" maxVal="{Long}15"/> </typeconfigs> </items>

But now i am not getting the behavior of radio button, means i can tick all radio buttons inside each tab that i add via dialog. Any idea how can i make that switch possible. Thanks

[img]tabs.png[/img]

1 Accepted Solution

Avatar

Correct answer by
Level 10

Look at this community article:

http://www.willdev4donuts.com/dialog-radio-buttons/#.VEbB-_nF--4

Use a radiogroup and give all instances the same name - that should make it so all buttons belong to the same group. 

View solution in original post

3 Replies

Avatar

Level 5

smacdonald2008 wrote...

Make sure you are grouping radio buttons correctly. See:

http://dev.day.com/docs/en/cq/current/widgets-api/index.html?class=CQ.Ext.form.Radio

http://dev.day.com/docs/en/cq/current/widgets-api/index.html?class=CQ.Ext.form.RadioGroup

In your example - each radio is acting like it belongs to a different group. 

 


Thanks, I have checked that but not able to figure out, How can i set up one radio option correspond to one title. As nodes for radio,options remains in order.

Avatar

Correct answer by
Level 10

Look at this community article:

http://www.willdev4donuts.com/dialog-radio-buttons/#.VEbB-_nF--4

Use a radiogroup and give all instances the same name - that should make it so all buttons belong to the same group.