Works with the Form plugin
This commit is contained in:
parent
6ce186584e
commit
5f50c08970
8 changed files with 221 additions and 404 deletions
|
@ -1,6 +1,68 @@
|
|||
enabled: true
|
||||
use_captcha: false
|
||||
recatpcha_site_key: ''
|
||||
recatpcha_secret: ''
|
||||
enable_email_notifications: false
|
||||
notifications_email_to: 'noreply@getgrav.org'
|
||||
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: 6Lde4gwTAAAAAAZuv4z2AgVU6Xamn5twDYzQr8hv
|
||||
# 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: 6Lde4gwTAAAAAPpwVKuaYm53n2bWfFfxcDxSlI54
|
||||
- addComment:
|
||||
- message: Thank you for writing your comment!
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue