silverstripe-framework/templates/forms/DropdownField.ss
JorisDebonnet 72a014d933 Allow '0' in DropdownField (#5199)
Display falsey values as option titles when they have been included.
2016-04-19 17:40:14 +12:00

6 lines
268 B
Scheme

<select $AttributesHTML>
<% loop $Options %>
<option value="$Value.XML"<% if $Selected %> selected="selected"<% end_if %><% if $Disabled %> disabled="disabled"<% end_if %>><% if $Title.exists %>$Title.XML<% else %>&nbsp;<% end_if %></option>
<% end_loop %>
</select>