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

Onepage website and Form problem

form

Started by jc ch 7 years ago · 0 replies · 398 views
7 years ago

Hi,

I have a problem with a form : https://agrienergie.coop/fr

Without the form, the website will be loaded correctly. With the form, you will not be on the banner.

I don't understand where is the problem and why the form do that.

My form:

form:
action: /fr
name: Formulaire
fields:

YAML
        name: name
        label: Name
        placeholder: 'Entrez votre nom'
        autofocus: 'on'
        autocomplete: 'on'
        type: text
        validate:
            required: true
    -
        name: email
        label: Email
        placeholder: 'Entrez votre courriel'
        type: text
        validate:
            rule: email
            required: true
    -
        name: message
        label: Message
        size: long
        placeholder: 'Entrer votre message'
        type: textarea
        validate:
            required: true
buttons:
    -
        type: submit
        value: Envoyer
        classes: 'gdlr-button with-border excerpt-read-more'
process:
    -
        email:
            from: '{{ config.plugins.email.from }}'
            to:
                - '{{ config.plugins.email.from }}'
                - '{{ form.value.email }}'
            subject: '[Feedback] {{ form.value.name|e }}'
            body: '{% include ''forms/data.html.twig'' %}'

I created a folder "form", a subfolder thankyou, a form.md and a template form

My template:

<div class="modular-row form {{ page.header.class }}">
<h2>{{ page.header.title }}</h2>
<span class="line"></span>
{{ content|raw }}
{% include "forms/form.html.twig" %}
</div>

form.html.twig is in /template/modular/

NOTE: without action: /fr the problem is same. With action: /fr in the main modular page, form can't be displayed

Thank you.

last edited 11/18/19 by jc ch

Suggested topics

Topic Participants Replies Views Activity
Support · by Duc , 2 hours ago
1 23 2 hours ago
Support · by Thomas, 1 week ago
3 102 11 hours ago
Support · by Anna, 3 days ago
2 99 1 day ago
Support · by Justin Young, 1 day ago
1 66 1 day ago
Support · by Duc , 1 week ago
2 101 6 days ago