Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature/contact form #17

Merged
merged 12 commits into from
Aug 17, 2020
Merged

Feature/contact form #17

merged 12 commits into from
Aug 17, 2020

Conversation

robdekort
Copy link
Contributor

This PR adds a content block with a contact form.

  • resources/forms/contact.yaml The contact form configuration.
  • resources/blueprints/forms/contact.yaml The forms blueprint defining all the fields.
  • resources/views/page_builder/_form_contact.antlers.html The forms template file.
  • resources/views/email/contact_owner.html The forms email template that goes out to the site owner. The _text.html version contains the text template.
  • resources/views/email/contact_sender.html The forms email template that goes out to the sender of the form. The _text.html version contains the text template.

Strings used in the e-mail templates are localized and defined in resources/lang/en/site.php.

The forms sending is done with AJAX and uses Alpine to display the various notifications.

Note: Peak dynamically fetches a CSRF token so you can even use forms with Static File Caching on. This technique is based on the Dynamic Token addon for Statamic v2 by Mykolas. It's ported to v3 and included with Peak.

@robdekort robdekort merged commit 9b1afa0 into main Aug 17, 2020
@robdekort robdekort deleted the feature/contact-form branch August 17, 2020 15:24
robdekort added a commit that referenced this pull request Dec 14, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant