[BUG] Results are set to false after successful form submission
Steps to reproduce:
- Dump result arrray in form template
- Submit form with correct data
- See dumped result
Expected result:
Returned result is filled with information about what happened during form processing. I can use this information as explained in https://github.com/bolt/boltforms/blob/4.1/templates/form/form.twig#L7
Actual result:
All results are set to false, so https://github.com/bolt/boltforms/blob/4.1/templates/form/form.twig#L40 this never happens as result.pass('email') is always false, even with correct form submission.
Therefore, comment line at https://github.com/bolt/boltforms/blob/4.1/templates/form/form.twig#L7 is not true as result array is always false.
Caused by:
Form after submission (with POST) gets redirected to same page (with GET) in src/Submission/Processor/Redirect.php:90 but this happens before updated Result is returned to user in src/Submission/Processor.php:163
Also feedback.redirect is not configured in my case.
What helped:
Commenting out lines 88-92 in file src/Submission/Processor/Redirect.php worked out for me, but I am sure there is a better solution.
I am not against redirecting after submission, but the result should be kept, for example as flash messages.