Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

Form.value is empty

form

Started by wlad k 7 years ago · 0 replies · 788 views
7 years ago

Hey guys,

my page is almost ready to go live and grav was a very fun experience.
But i currenlty have a issue regarding the form.value values.
After i press the submit button I receive a email but the subject and the body are empty, because I use 'Hello {{ form.value.name|e }}' and "{% include 'forms/data.html.twig' %}"' for the body.

My form is a modular page.

process:

TWIG
            -
                email:
                    from: '{{ config.plugins.email.from }}'
                    to:
                        - '{{ config.plugins.email.from }}'
                    subject: '[Feedback] {{ form.value.name|e }}'
                    body: '{% include ''forms/data.html.twig'' %}'

and fields

YAML
           -
                name: name
                id: name
                classes: left
                placeholder: Name
                autocomplete: 'on'
                type: text
                validate:
                    required: true
            -
                name: email
                id: email
                classes: right
                placeholder: E-Mail-Adresse
                type: email
                validate:
                    rule: email
                    required: true
            -

Thank you in advance and have a nice weekend,
Wlad

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 75 1 week ago
Plugins · by Xavier, 4 weeks ago
2 81 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1208 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 75 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 99 2 months ago