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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Contact form for modular page

Solved by Pedro M View solution

Started by Natalia Bazilenco 3 years ago · 4 replies · 479 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 Thomas, 1 week ago
3 90 1 hour ago
Support · by Anna, 3 days ago
2 92 22 hours ago
Support · by Justin Young, 23 hours ago
1 40 23 hours ago
Support · by Duc , 1 week ago
2 98 6 days ago
Support · by Colin Hume, 1 week ago
2 90 6 days ago