- Issue created by @douggreen
- Merge request !3Prevent checking a form multiple times during a single submit. β (Open) created by douggreen
- last update
10 months ago Composer require failure
We've set the threshold to 50, but it's actually getting hit after only 15 submits. This happens because form validation happens multiple times during a single submit (actually 4 times). While each site should work to prevent multiple validations, it's pretty common, and IMO this module should only count each click of the submit button once, not each time validation fires within a single thread.
We have a form being validated 4 times. We use twig_tweak and views. We have a page that adds the views exposed filter using twig_tweak's drupal_block() directive. Twig tweak validates the form twice and views validates it again twice. I'm not sure why it's happening twice for each of these.
Add a static variable to prevent multiple checks during a single submit.
Needs work
1.0
Code