Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save growtopiajaw/05726274596cc49cdf567d3292551177 to your computer and use it in GitHub Desktop.
Save growtopiajaw/05726274596cc49cdf567d3292551177 to your computer and use it in GitHub Desktop.
form.md
form:
name: contact
fields:
– name: name
label: Name
placeholder: Enter your name
autocomplete: on
type: text
validate:
required: true
– name: email
label: Email
placeholder: Enter your email address
type: email
validate:
rule: email
required: true
- name: message
label: Message
size: long
placeholder: Enter your message
type: textarea
validate:
required: true
buttons:
- type: submit
value: Submit
- type: reset
value: Reset
process:
- email:
from: “{{ form.value.email }}”
to: “{{ config.plugins.email.to }}”
subject: “[Healthcheck Contact Form] {{ form.value.name|e }}”
body: “{% include ‘forms/data.html.twig’ %}”
- save:
fileprefix: contact-
dateformat: Ymd-His-u
extension: txt
body: “{% include ‘forms/data.txt.twig’ %}”
- message: Thank you for getting in touch regarding your healthcheck report!
- display: thankyou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment