{% set customerSalutation = customer is not null ? customer.getSalutationObject() : null %}
{% set defaultSalutation = customerSalutation is not null ? customerSalutation : demi_core_configuration("getDefaultSalutation",[]) %}
{% set defaultSalutationId = defaultSalutation is not empty ? defaultSalutation.getId() : null %}
<div class="form-group">
<label class="form-box form-box--gray">
<span class="form-box__label">{{ 'demi.booking.checkout.salutation'|trans }} *</span>
<select name="salutation" class="form-box__content form-control" required
autocomplete="honorific-prefix">
<option value="">{{ 'demi.booking.checkout.please-choose'|trans }}</option>
{% for salutation in demi_getSortedSalutations() %}
{% if salutation["title"] is not empty %}
<option {{ defaultSalutationId == salutation["oo_id"] ? 'selected' : '' }} value="{{ salutation["oo_id"] }}">{{ salutation["title"] }}</option>
{% endif %}
{% endfor %}
</select>
<span class="demi-icon demi-icon-chevron-down form-box__select-icon" aria-hidden="true"></span>
</label>
<div class="form-errors"></div>
</div>