Hi.
I’m developing a web with theme Hola, and it’s configurated as a modular page, with the contact form in it. I’ve set the smtp credentials in email plugin, captcha in form plugin, and my .md file and template are correct. The form works correctly.
However, I can’t get to show the ‘Thank you’ page. The form shows a hidden div with the FORM_ALREADY_SUBMITTED when it sent data.
My pages structure is this:
01._home
…
06._contact
contact.es.md
/gracias
formdata.es.md
The formdata.html.twig is in the root folder of the theme (child theme).
The code of my files is this:
form:
name: contact-form
template: form-messages
refresh_prevention: true
fields:
-
name: Nombre
label: false
placeholder: Nombre
validate:
required: true
message: 'Este campo es obligatorio'
autofocus: 'off'
autocomplete: 'on'
type: text
outerclasses: form-field
classes: full-width
-
name: Email
label: false
placeholder: Email
validate:
required: true
message: 'Este campo es obligatorio'
type: email
outerclasses: form-field
classes: full-width
-
name: Asunto
label: false
type: text
placeholder: Asunto
validate:
required: true
message: 'Este campo es obligatorio'
outerClasses: form-field
classes: full-width
-
name: Mensaje
label: false
placeholder: Mensaje
validate:
required: true
message: 'Este campo es obligatorio'
type: textarea
outerclasses: form-field
classes: full-width
rows: null
-
g-recaptcha-response: null
label: Captcha
type: captcha
recaptcha_not_validated: '¡Captcha no válido!'
buttons:
-
type: submit
value: Enviar
outerclasses: form-field
classes: 'full-width btn--primary'
process:
captcha: true
save:
fileprefix: contact-
dateformat: dmY-His-u
extension: txt
body: '{% include ''forms/data.txt.twig'' %}'
email:
subject: '[Formulario de juanvillen.es] {{ form.value.name|e }}'
body: '{% include ''forms/data.html.twig'' %}'
display: /gracias
Note: (I’ve tested with display: gracias, without ‘/’)
I don’t know where is the fail.
Could help me somebody?
I attach some screenshots:
Thanks