Closed simogeo closed 2 years ago
I have adapted my code from deliver theme to replace simple_form to contact form in my contact page. Here is the content of my modular_alt.md file :
--- title: Contactez-nous ! onpage_menu: false body_classes: "modular header-lite fullwidth" bg_color: "#B4B093" form: name: contact-form fields: - name: name id: name label: Nom & prénom classes: form-control form-control-lg placeholder: 'Entrez vos nom et prénom' autocomplete: on type: text validate: required: true - name: email id: email classes: form-control form-control-lg label: Email placeholder: 'Entrez votre adresse email' type: email validate: required: true - name: message label: Message classes: form-control form-control-lg size: long placeholder: 'Entrez votre message' type: textarea validate: required: true buttons: - type: submit value: Envoyer classes: btn btn-primary btn-block 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' %}" - save: fileprefix: feedback- dateformat: Ymd-His-u extension: txt body: "{% include 'forms/data.txt.twig' %}" - message: 'Merci pour votre message ! Nous reviendrons vers vous très vite.' - display: thankyou content: items: @self.modular order: by: default dir: asc ---
But required attribute is not applying to my form inputs !
And I don't understand why !
I use Form v6.0.0, Grav v1.7.32 - Admin v1.10.32
Many thanks for helping me,
Fixed, I had to remove the forms folder from current theme.
forms
I have adapted my code from deliver theme to replace simple_form to contact form in my contact page. Here is the content of my modular_alt.md file :
But required attribute is not applying to my form inputs !
And I don't understand why !
I use Form v6.0.0, Grav v1.7.32 - Admin v1.10.32
Many thanks for helping me,