Skip to content
Snippets Groups Projects
Commit 261dcd07 authored by Thorge Petersen's avatar Thorge Petersen
Browse files

Allow empty option values in autocomplete select

parent 7d71e16b
Branches
Tags
1 merge request!52Added applicableLegislation and hvdCategory support
......@@ -176,11 +176,9 @@ is_required=false) %}
<select id="{{ (id or name) }}" name="{{ name }}"
{{ attributes(attrs) }} data-module="autocomplete"{% if is_multiple %} multiple{% endif %}>
{% for option in options %}
{% if option.key %}
<option value="{{ option.key }}"{% if option.key in selected %} selected="selected"{% endif %}>
{{ option.text or option.value }}
</option>
{% endif %}
<option value="{{ option.key or '' }}"{% if option.key in selected %} selected="selected"{% endif %}>
{{ option.text or option.value }}
</option>
{% endfor %}
</select>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment