196
rated 0 times
[
197]
[
1]
/ answers: 1 / hits: 30109
/ 9 Years ago, thu, june 11, 2015, 12:00:00
I have been passed down a complex application which dynamically creates HTML.
The problem is, the previous person did not know that the name attribute of radio buttons actually is the group association.
With the following mark up, is there any way to put these in two groups
<div>
<%-- would like this to be a seperate group without changing name--%>
<label class=radio-inline><input type=radio name=radio value=1>Group 1 Option 1</label>
<label class=radio-inline><input type=radio name=radio value=2>Group 1 Option 2</label>
<label class=radio-inline><input type=radio name=radio value=3>Group 1 Option 3</label>
</div>
<div>
<%-- would like this to be a seperate group without changing name--%>
<label class=radio-inline><input type=radio name=radio value=1>Group 2 Option 1</label>
<label class=radio-inline><input type=radio name=radio value=2>Group 2 Option 2</label>
<label class=radio-inline><input type=radio name=radio value=3>Group 2 Option 3</label>
</div>
Is there any div or anything I can wrap around them to separate the grouping? I have tried field set and legend but it has no effect. I know I could put each one in a form but then they will not all be submitted.
More From » html