{% set originalValue = originalValue is defined ? originalValue : value %} {% set toggleableChecked = field.toggleable and (originalValue is not null and originalValue is not empty) %} {% set isDisabledToggleable = field.toggleable and not toggleableChecked %} {% set value = (is_object(value) or value is null ? field.default : value) %} {% set cookie_name = 'forms-' ~ form.name ~ '-' ~ field.name %} {% set value = (is_object(value) or value is null ? (get_cookie(cookie_name) is null ? field.default : get_cookie(cookie_name)) : value) %} {% set errors = attribute(form.messages, field.name) %} {% set required = client_side_validation and field.validate.required in ['on', 'true', 1] %} {% set autofocus = (inline_errors == false) and field.autofocus in ['on', 'true', 1] %} {% if inline_errors and errors %} {% set autofocus = true %} {% endif %} {% block field %}
{% block contents %} {% if field.label is not same as(false) and field.display_label is not same as(false) %}
{% endif %}
{% block group %} {% block input %}
{% block prepend %}{% endblock prepend %} {% block append %}{% endblock append %} {% if inline_errors and errors %}
{% for error in errors %}

{{ error }}

{% endfor %}
{% endif %}
{% endblock %} {% endblock %} {% if field.description %}
{% if field.markdown %} {{ field.description|t|markdown(false)|raw }} {% else %} {{ field.description|t|raw }} {% endif %}
{% endif %}
{% endblock %}
{% endblock %}