Skip to content

Field label not included in Twig when markdown: true is present #620

@lucasicr

Description

@lucasicr

When including markdown: true (see #233) in a field, the field label no longer appears in {% include "forms/form.html.twig" %}.

Not only the checkbox field is affected, but the text, checkboxes and other fields are too.

Minimal working example

---
form:
    fields:
        personal:
            type: fieldset
            fields:
                email:
                    label: 'email address'
                    type: email
                    validate:
                        required: true
                agreement:
                    type: checkbox
                    markdown: true
                    label: 'I agree to the [terms and conditions](https://mywebsite.com/terms-and-conditions)'
                    validate:
                        required: true
    buttons:
        submit:
            type: submit
            value: Submit
    process:
        email:
            from: no-reply@mywebsite.com
            to: '{{ form.value.email|e }}'
            body: '{% include ''forms/data.html.twig'' %}'
---

Email response:

email: joe@gmail.com
: GRAV.YES

Expected response:

email: joe@gmail.com
I agree to the terms and conditions: GRAV.YES

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions