Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

'reset: true' in form resets form data in thankyou page

Solved by paul View solution

Started by paul 6 years ago · 1 replies · 447 views
6 years ago

Like the title says, my contact form has the parameter

YAML
process:
   reset: true

This seems to prevent the submitted form data from showing in the thankyou page.

Removing reset: true or setting to false allows the data to be posted.

Is there a workaround for this?

6 years ago Solution

I didn't read the docs carefully enough:

By default, the form is not cleared after the submit. So if you don't have a display action and the user is sent back to the form page, it's still filled with the data entered. If you want to avoid this, add a reset action:

Going to a thankyou page is a display action, therefore reset is not appropriate.

👍 1

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1165 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 88 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 163 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 138 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 156 7 months ago