Radio Button Selection for Multifield | Community
Skip to main content
Level 5
October 16, 2015
Solved

Radio Button Selection for Multifield

  • October 16, 2015
  • 3 replies
  • 1924 views

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]

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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. 

3 replies

smacdonald2008
Level 10
October 16, 2015

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. 

vdhim23Author
Level 5
October 16, 2015

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.

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

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.