I've created a custom table and a page type in Kentico 11. The page type has a 'Drop-down list' form control. The form control is using an SQL Query to pull the data from the custom table.
My question is: Can the form control handle <optgroup> tags or am I limited to only doing simple <option> tags within the rendered out <select> tag.
<optgroup>
<option>
<select>
Example:
<select class="form-control"> <option value="0">-- Please Select a Site --</option> <option value="980">All Pictures</option> <option value="981">All Colours</option> <option value="982">All Lines</option> <optgroup label="Pictures"> <option value="1">Pets</option> <option value="2">People</option> <option value="3">Buildings</option> </optgroup> <optgroup label="Colours"> <option value="14">Red</option> <option value="23">Green</option> <option value="22">Blue</option> </optgroup> <optgroup label="Lines"> <option value="11">Solid</option> <option value="12">Dashed</option> <option value="10">wavy</option> <option value="24">dots</option> </optgroup> </select>
Thank you
I don't believe any built-in dropdown form control supports optgroup, but you can develop your own custom form control.
Please, sign in to be able to submit a new answer.