Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit fbdceb6

Browse files
Docs (select): Corrected wrong instructions for vertically grouped select inputs
1 parent 15e30a9 commit fbdceb6

File tree

1 file changed

+73
-73
lines changed

1 file changed

+73
-73
lines changed

docs/forms/selects/index.html

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -204,86 +204,86 @@ <h2>Vertically grouped select inputs</h2>
204204

205205
<p>Because the <code>label</code> element will be associated with each individual select input, we recommend wrapping the selects in a <code>fieldset</code> element that has a <code>legend</code> which acts as the combined label for the grouped inputs.</p>
206206

207-
<p>Lastly, one needs to wrap the <code>fieldset</code> in a <code>div</code> with <code> data-role="controlgroup"</code> attribute, so it can be styled as a group.</p>
207+
<p>Lastly, one needs to add the <code>data-role="controlgroup"</code> attribute to the <code>fieldset</code>, so it will be styled as a group.</p>
208208

209209
<pre><code>
210210
&lt;div data-role=&quot;fieldcontain&quot;&gt;
211-
&lt;fieldset data-role=&quot;controlgroup&quot;&gt;
212-
&lt;legend&gt;Date of Birth:&lt;/legend&gt;
213-
214-
&lt;label for="select-choice-month">Month&lt;/label&gt;
215-
&lt;select name="select-choice-month" id="select-choice-month"&gt;
216-
&lt;option&gt;Month&lt;/option&gt;
217-
&lt;option value="jan"&gt;January&lt;/option&gt;
218-
&lt;!-- etc. --&gt;
219-
&lt;/select&gt;
220-
221-
&lt;label for="select-choice-day">Day&lt;/label&gt;
222-
&lt;select name="select-choice-day" id="select-choice-day"&gt;
223-
&lt;option&gt;Day&lt;/option&gt;
224-
&lt;option value="1"&gt;1&lt;/option&gt;
225-
&lt;!-- etc. --&gt;
226-
&lt;/select&gt;
227-
228-
&lt;label for="select-choice-year">Year&lt;/label&gt;
229-
&lt;select name="select-choice-year" id="select-choice-year"&gt;
230-
&lt;option&gt;Year&lt;/option&gt;
231-
&lt;option value="2011"&gt;2011&lt;/option&gt;
232-
&lt;!-- etc. --&gt;
233-
&lt;/select&gt;
234-
&lt;/fieldset&gt;
211+
&lt;fieldset data-role=&quot;controlgroup&quot;&gt;
212+
&lt;legend&gt;Date of Birth:&lt;/legend&gt;
213+
214+
&lt;label for="select-choice-month">Month&lt;/label&gt;
215+
&lt;select name="select-choice-month" id="select-choice-month"&gt;
216+
&lt;option&gt;Month&lt;/option&gt;
217+
&lt;option value="jan"&gt;January&lt;/option&gt;
218+
&lt;!-- etc. --&gt;
219+
&lt;/select&gt;
220+
221+
&lt;label for="select-choice-day">Day&lt;/label&gt;
222+
&lt;select name="select-choice-day" id="select-choice-day"&gt;
223+
&lt;option&gt;Day&lt;/option&gt;
224+
&lt;option value="1"&gt;1&lt;/option&gt;
225+
&lt;!-- etc. --&gt;
226+
&lt;/select&gt;
227+
228+
&lt;label for="select-choice-year">Year&lt;/label&gt;
229+
&lt;select name="select-choice-year" id="select-choice-year"&gt;
230+
&lt;option&gt;Year&lt;/option&gt;
231+
&lt;option value="2011"&gt;2011&lt;/option&gt;
232+
&lt;!-- etc. --&gt;
233+
&lt;/select&gt;
234+
235+
&lt;/fieldset&gt;
235236
&lt;/div&gt;
236237
</code></pre>
237238

238239
<div data-role="fieldcontain">
239-
<fieldset data-role="controlgroup">
240-
<legend>Date of Birth:</legend>
241-
242-
<label for="select-choice-month">Month</label>
243-
<select name="select-choice-month" id="select-choice-month">
244-
<option>Month</option>
245-
<option value="jan">January</option>
246-
<option value="dec">December</option>
247-
<option value="feb">February</option>
248-
<option value="mar">March</option>
249-
<option value="apr">April</option>
250-
<option value="may">May</option>
251-
<option value="jun">June</option>
252-
<option value="jul">July</option>
253-
<option value="aug">August</option>
254-
<option value="sep">September</option>
255-
<option value="oct">October</option>
256-
<option value="nov">November</option>
257-
<option value="dec">December</option>
258-
</select>
259-
260-
<label for="select-choice-day">Day</label>
261-
<select name="select-choice-day" id="select-choice-day">
262-
<option>Day</option>
263-
<option value="1">1</option>
264-
<option value="2">2</option>
265-
<option value="3">3</option>
266-
<option value="4">4</option>
267-
<option value="5">5</option>
268-
<option value="6">6</option>
269-
<option value="7">7</option>
270-
</select>
271-
272-
<label for="select-choice-year">Year</label>
273-
<select name="select-choice-year" id="select-choice-year">
274-
<option>Year</option>
275-
<option value="2011">2011</option>
276-
<option value="2010">2010</option>
277-
<option value="2009">2009</option>
278-
<option value="2008">2008</option>
279-
<option value="2007">2007</option>
280-
<option value="2006">2006</option>
281-
<option value="2005">2005</option>
282-
<option value="2004">2004</option>
283-
</select>
284-
</fieldset>
285-
286-
</div>
240+
<fieldset data-role="controlgroup">
241+
<legend>Date of Birth:</legend>
242+
243+
<label for="select-choice-month">Month</label>
244+
<select name="select-choice-month" id="select-choice-month">
245+
<option>Month</option>
246+
<option value="jan">January</option>
247+
<option value="dec">December</option>
248+
<option value="feb">February</option>
249+
<option value="mar">March</option>
250+
<option value="apr">April</option>
251+
<option value="may">May</option>
252+
<option value="jun">June</option>
253+
<option value="jul">July</option>
254+
<option value="aug">August</option>
255+
<option value="sep">September</option>
256+
<option value="oct">October</option>
257+
<option value="nov">November</option>
258+
<option value="dec">December</option>
259+
</select>
260+
261+
<label for="select-choice-day">Day</label>
262+
<select name="select-choice-day" id="select-choice-day">
263+
<option>Day</option>
264+
<option value="1">1</option>
265+
<option value="2">2</option>
266+
<option value="3">3</option>
267+
<option value="4">4</option>
268+
<option value="5">5</option>
269+
<option value="6">6</option>
270+
<option value="7">7</option>
271+
</select>
272+
273+
<label for="select-choice-year">Year</label>
274+
<select name="select-choice-year" id="select-choice-year">
275+
<option>Year</option>
276+
<option value="2011">2011</option>
277+
<option value="2010">2010</option>
278+
<option value="2009">2009</option>
279+
<option value="2008">2008</option>
280+
<option value="2007">2007</option>
281+
<option value="2006">2006</option>
282+
<option value="2005">2005</option>
283+
<option value="2004">2004</option>
284+
</select>
285+
</fieldset>
286+
</div>
287287

288288
<h2>Horizontally grouped select inputs</h2>
289289
<p>Select inputs can also be used for grouped sets with more than one related selections. To make a horizontal button set, add the <code>data-type="horizontal"</code> to the fieldset. Note that the buttons which trigger the select will resize depending on the currently selected option's value. Note that browsers without support for <code>display: inline-block;</code> will group the selects vertically, as above.</p>

0 commit comments

Comments
 (0)