Nothing I do fixes this problem and it is causing big problems for us. It's making me start to doubt Grav. I have been unable to debug the problem, even with error logging and debugging turned on. I get no logs, and when I submit the form, the debug bar goes away and won't come back. If I touch the form it may break, but not in a logical / predictable way.
The site is on the latest Grav with up-to-date plugins, and the theme is a Grav one called "Woo" which was last updated a year ago. I copied the theme after that last update to it, and have changed much styling, that's all.
The expected result is: I submit the form, it goes to the "thank you" page, and if I reload the browser the form shows again.
There are two possible bad outcomes after submit, and the behavior switches between them:
- The form clears and does not go to the Thank You page.
- The form goes to the Thank You page, but you can never go back to the form (not by reloading, and not by navigating around - you have to manually clear the cache from the admin tool).
Here is what the page's yaml looks like - if you see anything wrong about it please let me know:
title: Order
published: true
body_classes: order
cache_enable: false
form:
name: order
fields:
directions:
type: display
label: 'Order to be delivered to your door!'
markdown: true
content: 'After you fill out this form, we will contact you to confirm your order.'
name:
label: Name
placeholder: 'Enter your name'
type: text
validate:
required: true
email:
label: Email
placeholder: 'Enter your email address'
type: email
validate:
required: true
address1:
label: 'Address Line 1'
type: text
validate:
required: true
address2:
label: 'Address Line 2'
type: text
validate:
required: false
city:
label: City
type: text
validate:
required: true
phone:
label: Phone
type: text
validate:
required: true
choose:
type: display
label: Flavors
markdown: true
content: 'Specify how many jars of each flavor:'
flavor-one:
label: 'One - $7'
type: number
placeholder: '# of jars'
flavor-two:
label: 'Two - $7'
type: number
placeholder: '# of jars'
flavor-three:
label: 'Three - $7'
type: number
placeholder: '# of jars'
day:
label: 'Day of Delivery (Friday July 17, Saturday July 18)'
type: date
validate:
min: '2020-07-17'
max: '2020-07-18'
required: true
buttons:
submit:
type: submit
value: Submit
reset:
type: reset
value: Reset
process:
save:
fileprefix: order-
dateformat: Ymd-His-u
extension: txt
body: '{% include ''forms/data.txt.twig'' %}'
email:
subject: '[Order Form] {{ form.value.name|e }}'
body: '{% include ''forms/data.html.twig'' %}'
message: 'We will contact you to confirm soon.'
display: thankyou