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

Open in your IDE?
  1. <div class="form-group form-{{ formElement.type }}-{{ formElement.name }}">
  2.     {% if formElementLabel %}
  3.         {% sw_include "@MoorlFormBuilder/plugin/moorl-form-builder/component/label.html.twig" ignore missing %}
  4.     {% endif %}
  5.     <div class="form-input-group">
  6.         {% for option in formElement.options %}
  7.             {% set optionLabel = option.translated.label %}
  8.             <div class="custom-control custom-checkbox">
  9.                 <input type="checkbox"
  10.                        class="custom-control-input"
  11.                        id="{{ option.value }}-{{ formElementId }}"
  12.                        name="{{ formElement.name }}[]"
  13.                        value="{{ option.value }}"
  14.                        {% if formElementValue and option.value in formElementValue %}checked{% endif %}>
  15.                 <label class="custom-control-label" for="{{ option.value }}-{{ formElementId }}">
  16.                     {% if option.mediaId %}
  17.                         {% set optionMedia = mediaCollection.get(option.mediaId) %}
  18.                         {% if optionMedia %}
  19.                             <img alt="{{ optionMedia.fileName }}" src="{{ optionMedia.url }}">
  20.                         {% endif %}
  21.                     {% endif %}
  22.                     <div class="w-100">
  23.                         {{ optionLabel }}
  24.                         {% sw_include "@MoorlFormBuilder/plugin/moorl-form-builder/component/price-label.html.twig" ignore missing %}
  25.                     </div>
  26.                 </label>
  27.             </div>
  28.         {% endfor %}
  29.     </div>
  30. </div>