grav-plugin-comments/comments.yaml

78 lines
1.8 KiB
YAML

enabled: true
enable_on_routes:
- '/blog'
disable_on_routes:
- /blog/blog-post-to-ignore
- /ignore-this-route
#- '/blog/daring-fireball-link'
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
buttons:
- type: submit
value: Submit
process:
# - email:
# subject: "[Site Guestbook] {{ form.value.name|e }}"
# body: "{% include 'forms/data.html.twig' %}"
# - captcha:
# recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je
- addComment:
- message: Thank you for writing your comment!