bolt form success fails
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reviewing boltforms/src/Submission/Result.php and the SUBMISSION_POST_PROCESSOR handling, then compare it with the feedback configuration in boltforms.bolt.yml. Reproduce the valid submission using join_page_form.twig and boltforms('join') with success and redirect feedback; done means the template renders without the invalid-result Twig exception.
Written by the indexing model from the issue text.
Description
I have bolt form with post processing on BoltFormsEvents::SUBMISSION_POST_PROCESSOR.
Forms show correctly, its correctly validated, if not valid correct messages show but if form is valid it fails just after mine post processing.
I've tried with feedback.success and feedback.redirect both fails the same way:
Uncaught Exception: Twig_Error_Runtime .
Twig_Error_Runtime in Template.php line 447:
An exception has been thrown during the rendering of a template ("Attempted to access invalid result: boltforms.submission_post_processor") in "main-pages/join_page_form.twig" at line 6.
join_page_form.twig:
<div>
{{ boltforms('join') }}
</div>
boltforms.bolt.yml:
join:
notification:
enabled: false
feedback:
success: Thank you!
error: There are errors in the form, please fix before trying to resubmit
redirect:
target: page/thank-you
templates:
form: boltforms\join_form.twig
fields:
...
It doesn't seem that boltforms/src/Submission/Result.php work with SUBMISSION_POST_PROCESSOR.
Please advice if its my error in config or issue with bolt forms and how to deal with it.
Versions:
bolt/bolt: v3.3.6
bolt/boltforms: v4.1.13
- Dominant language
- PHP
- Stars
- 52
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bolt/boltforms
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·