Skip to content

Instantly share code, notes, and snippets.

@garethredfern
Created January 13, 2015 12:40
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 garethredfern/186f7ba20865c5c8f47b to your computer and use it in GitHub Desktop.
Save garethredfern/186f7ba20865c5c8f47b to your computer and use it in GitHub Desktop.
Request funds Raven formset for Statamic.
###########################################################################################
#
# REQUEST FUNDS RAVEN FORMSET
#
# Formsets can override any default settings (raven.yaml) EXCEPT master_killswitch
#
###########################################################################################
# Location (from root) to save form submissions
submission_save_path: _content/_funds/
filename_format: "{{ job_url|lower|slugify }}/{{ year }}-{{ month }}-{{ day }}-{{ contractor_username }}"
# Fields allowed to be submitted in the form, automatically
# purging anything and everything else
allowed:
- amount
- job_url
- description
- customer_uid
- contractor_uid
- contractor_username
# 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:
- amount
- description
submission_save_extension: md
# Apply validation rules to specific fields. Refer to documentation
# for a full list of available rules and their format
validate:
amount:
positive: true
messages:
amount: "Needs to be a positive number with no £ symbol."
# Configure notification email
send_notification_email: true
email:
to: example@example.com
from: example@example.com
subject: Funds Requested
automagic: false
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