grav-plugin-comments/comments.yaml

78 lines
1.7 KiB
YAML
Raw Permalink Normal View History

2015-09-13 18:32:44 +00:00
enabled: true
enable_on_routes:
- '/blog'
disable_on_routes:
- /blog/blog-post-to-ignore
- /ignore-this-route
#- '/blog/daring-fireball-link'
2015-10-13 21:39:13 +00:00
form:
name: comments
fields:
- name: name
label: Name
placeholder: Enter your name
autofocus: on
autocomplete: on
type: text
validate:
required: true
- name: email
label: Email
placeholder: Enter your email address
type: email
validate:
required: true
- name: text
label: Message
placeholder: Enter your message
type: textarea
validate:
required: true
- name: date
type: hidden
process:
fillWithCurrentDateTime: true
- name: title
type: hidden
evaluateDefault: grav.page.header.title
- name: lang
type: hidden
evaluateDefault: grav.language.getLanguage
- name: path
type: hidden
evaluateDefault: grav.uri.path
- name: g-recaptcha-response
label: Captcha
type: captcha
recatpcha_site_key: e32iojeoi32jeoi32jeoij32oiej32oiej3
recaptcha_not_validated: 'Captcha not valid!'
validate:
required: true
process:
ignore: true
2015-10-13 21:39:13 +00:00
buttons:
- type: submit
value: Submit
process:
- email:
subject: "[New Comment] from {{ form.value.name|e }}"
body: "{% include 'forms/data.html.twig' %}"
- captcha:
recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je
2015-10-13 21:39:13 +00:00
- addComment:
- message: Thank you for writing your comment!