Closed maximelebreton closed 1 year ago
Hi all!
I want to get the checked checkboxes labels in the body object (example: Captation vidéo label), but there is only the name and value in the form fields object, so the message body is like this:
Captation vidéo label
Message body:
Object: {"object-captation_video":"captation_video"}
contact.md:
name: object type: checkboxes options: enregistrement: enregistrement mixage: Mixage label travaux_d_electronique: Travaux d'électronique label captation_video: Captation vidéo label
default/data.html.twig
{% for index, field in form.fields %} {% set input = attribute(field, "input@") %} {% if input is null or input == true %} {% block field %} <div> {% block field_label %} <strong>{{ field.label }}</strong>: {% endblock %} {% block field_value %} {{ string(form.value(field.name ?? index))|nl2br }} {% endblock %} </div> {% endblock %} {% endif %} {% endfor %}
Any ideas to figure out?
Hi all!
I want to get the checked checkboxes labels in the body object (example:
Captation vidéo label
), but there is only the name and value in the form fields object, so the message body is like this:Message body:
contact.md:
default/data.html.twig
Any ideas to figure out?