custom/plugins/MoorlForms/src/Resources/views/plugin/moorl-fb/component/element/select.html.twig line 1

Open in your IDE?
  1. {% sw_extends "@MoorlForms/plugin/moorl-fb/component/element/field.html.twig" %}
  2. {% block input_el %}
  3.     <select name="{{ elementTechnicalName }}"
  4.             id="{{ elementId }}"
  5.             {% if element.required %}required{% endif %}
  6.             class="custom-select">
  7.         {% if element.translated.placeholder %}
  8.             <option value="" selected>{{ element.translated.placeholder }}</option>
  9.         {% endif %}
  10.         {% for treeItem in children %}
  11.             <option
  12.                     value="{{ treeItem.element.technicalName }}"
  13.                     data-fb-conditions='{{ treeItem.element.conditions|json_encode|raw }}'
  14.                     data-moorl-fb-option-price="{{ treeItem.element.calculatedPrice.unitPrice }}"
  15.                     {% if treeItem.element.disabled %}readonly{% endif %}
  16.                     {% if treeItem.element.technicalName in elementValue %}selected{% endif %}
  17.             >
  18.                 {{ treeItem.element.translated.name }}
  19.                 {% sw_include "@MoorlForms/plugin/moorl-fb/component/wrapper/price-label-plain.html.twig" ignore missing with {
  20.                     element: treeItem.element
  21.                 } %}
  22.             </option>
  23.         {% endfor %}
  24.     </select>
  25. {% endblock %}