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

Contact form for modular page

Solved by Pedro M View solution

Started by Natalia Bazilenco 3 years ago · 4 replies · 600 views
3 years ago

I'm not stupid, but I can't figure out how to display a contact form on a module page. I read the instructions:

If your theme does not provide a templates/forms/form.html.twig file, it's not set up to use forms, but no fear - just copy the form templates from Antimatter, the default Grav theme:
templates/form.html.twig
templates/formdata.html.twig

In Qurak theme in templates/forms/ desnot exist form.html.twig
Ok, I download a Antimatter theme and in folder templates/ only form.html twig

Maybe there is another instruction on how to make a form and display it on a module page. Please.

3 years ago

Thanks. How disable privacy validation?

last edited 03/10/23 by Natalia Bazilenco
3 years ago

@NataliaB, you just have to delete these lines in contact.md:

YAML
      -
           name: Privacy
           type: privacy
           label: 'Privacy Policy'
           validate:
               required: true
               message: 'By using this form you agree with our Privacy Policy'

You have the demo content in the GitHub repository.

3 years ago

@NataliaB Have you taken a look at the Editorial repository, on the demo content?

Look at the contents of contact.md, on the modular home page, and thankyou.md in the root folder.

It's all you have to do.

However, all the information related to the contact forms in Grav can be found in its documentation.

Suggested topics

Topic Participants Replies Views Activity
Support · by Paul Hodges, 4 weeks ago
19 485 5 days ago
Support · by Lauw, 7 days ago
2 99 7 days ago
Support · by Anna, 3 weeks ago
4 426 1 week ago
Support · by gtx, 4 weeks ago
4 377 3 weeks ago
Support · by Anna, 1 month ago
9 484 3 weeks ago