Skip to content

Instantly share code, notes, and snippets.

@budparr
Created November 11, 2013 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save budparr/7421231 to your computer and use it in GitHub Desktop.
Save budparr/7421231 to your computer and use it in GitHub Desktop.
# Location (from root) to save form submissions
submission_save_path: _content/_forms/
# Prefix your files with a string which are saved in the format:
# YYYY-MM-DD-HH-MM-SS.yaml
file_prefix: book-awards
# Prefix your files with a string which are saved in the format:
# YYYY-MM-DD-HH-MM-SS.yaml
# file_suffix: - {{ name }}
# Fields allowed to be submitted in the form, automatically
# purging anything and everything else
allowed:
- first-name
- last-name
- email
- phone
- book-title
- book-publisher
- author-name
- author-country-of-birth
- author-country-of-citizenship
- book-category
- book-date-of-first-publication
- payment-method
# You are not required to require fields, but once you do, any missing
# from the POST will squash this submission and send a list of
# missing fields to your {{ raven:errors }} tagpair
required:
- email
- phone
- book-title
- book-publisher
- author-name
- book-category
- book-date-of-first-publication
# Apply validation rules to specific fields. Refer to documentation
# for a full list of available rules and their format
validate:
email: email
# Error messages can be mapped to your fields and passed to the
# template upon failure. They will be available here:
#
# {{ raven:error }}
# {{ invalid }}
# {{ field }} : {{ message }}
# {{ /invalid }}
# {{ /raven:error }}
#
messages:
from: "An Email Address, please!"
# Configure notification email
email:
to: me@example.com
from: me@example.com
subject: Book Awards Submission from {{ first-name }} {{ last-name }}
automagic: true
# html_template: html_email
# text_template: text_email
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment