vendor/store.shopware.com/moorlformbuilder/src/Resources/views/plugin/moorl-form-builder/component/form-element/select.html.twig line 1

Open in your IDE?
  1. <div class="form-group form-{{ formElement.type }}-{{ formElement.name }}">
  2.     {% sw_include "@MoorlFormBuilder/plugin/moorl-form-builder/component/label.html.twig" ignore missing %}
  3.     {% set formElementInput %}
  4.         <select name="{{ formElementName }}"
  5.                 id="{{ formElementId }}"
  6.                 {% if formElement.required %}required{% endif %}
  7.                 class="custom-select">
  8.             {% if formElementPlaceholder %}
  9.                 <option value="" disabled selected>{{ formElementPlaceholder }}</option>
  10.             {% endif %}
  11.             {% for option in formElement.options %}
  12.                 {% set optionLabel = option.translated.label %}
  13.                 <option value="{{ option.value }}"
  14.                         {% if not option.value %}readonly{% endif %}
  15.                         {% if option.value == formElementValue %}selected{% endif %}>
  16.                     {{ optionLabel }}
  17.                     {% sw_include "@MoorlFormBuilder/plugin/moorl-form-builder/component/price-label.html.twig" ignore missing %}
  18.                 </option>
  19.             {% endfor %}
  20.         </select>
  21.     {% endset %}
  22.     {% sw_include "@MoorlFormBuilder/plugin/moorl-form-builder/component/input-group.html.twig" ignore missing %}
  23. </div>