field-multiple-value-form--paragraphs-sets.html.twig in Paragraphs Sets 8
Same filename and directory in other branches
Theme override for an individual form element of paragraphs_sets.
Available variables for all fields:
- multiple: Whether there are multiple instances of the field.
Available variables for single cardinality fields:
- elements: Form elements to be rendered.
Available variables when there are multiple fields.
- table: Table of field items.
- description: The description element containing the following properties:
- content: The description content of the form element.
- attributes: HTML attributes to apply to the description container.
- button: "Add another item" button.
- selection: Set selection button.
See also
template_preprocess_field_multiple_value_form__paragraphs_sets()
2 theme calls to field-multiple-value-form--paragraphs-sets.html.twig
- InlineParagraphsWidget::formMultipleElements in src/
Plugin/ Field/ FieldWidget/ InlineParagraphsWidget.php - Special handling to create form elements for multiple values.
- ParagraphsWidget::formMultipleElements in src/
Plugin/ Field/ FieldWidget/ ParagraphsWidget.php - Special handling to create form elements for multiple values.
File
templates/field-multiple-value-form--paragraphs-sets.html.twigView source
- {#
- /**
- * @file
- * Theme override for an individual form element of paragraphs_sets.
- *
- * Available variables for all fields:
- * - multiple: Whether there are multiple instances of the field.
- *
- * Available variables for single cardinality fields:
- * - elements: Form elements to be rendered.
- *
- * Available variables when there are multiple fields.
- * - table: Table of field items.
- * - description: The description element containing the following properties:
- * - content: The description content of the form element.
- * - attributes: HTML attributes to apply to the description container.
- * - button: "Add another item" button.
- * - selection: Set selection button.
- *
- * @see template_preprocess_field_multiple_value_form__paragraphs_sets()
- */
- #}
- {% if multiple %}
- <div class="js-form-item form-item">
- {% if selection %}
- <div class="clearfix set-selection-wrapper">{{ selection }}</div>
- {% endif %}
- {{ table }}
- {% if description.content %}
- <div{{ description.attributes.addClass('description') }} >{{ description.content }}</div>
- {% endif %}
- {% if button %}
- <div class="clearfix button-wrapper">{{ button }}</div>
- {% endif %}
- </div>
- {% else %}
- {% if selection %}
- <div class="clearfix">{{ selection }}</div>
- {% endif %}
- {% for element in elements %}
- {{ element }}
- {% endfor %}
- {% endif %}