How to stop sending form and back to it after a submit validation action ?

Stop a form from submitting after failed validation in ChronoForms.

Overview

The form submits regardless of validation because the Event Switcher action was not correctly configured to handle a false result.
Use an Event Load action in the fail event of the Event Switcher to return to the form and display a correction message.

Answered
ChronoForms v6
pd pdforest 15 Oct, 2019
I have a form with a php that is evaluated by an event switcher in the submit action but the forms is sending every time, doesn't matter if the event is true or false.
How can I get back to it and display a message in the system message bar to correct the fields before sending it ?

Thanks,
Pablo
Gr GreyHead 16 Oct, 2019
Hi pdforest,
​
Do you have an Event Loop action in the fail event of the Event Switcher?
​
Bob
pd pdforest 16 Oct, 2019
Hi Greygead thanks for your attention!
​
No just an event switcher.
How to stop sending form and back to it after a submit validation action ? image 1
he healyhatman 16 Oct, 2019
He meant an event switcher, event loop is what it's called in v5.
​
Post your debug, and make sure your PHP is returning a boolean and not the string "false"
pd pdforest 16 Oct, 2019
Hi thanks!
I changed true/false by 1/0 but worked the same way. I want to come back to the form in case of error, not to continue sending the form.
How to stop sending form and back to it after a submit validation action ? image 2How to stop sending form and back to it after a submit validation action ? image 3
Thanks,
Pablo
he healyhatman 16 Oct, 2019
Answer
There's a problem with the event switcher at the moment. Instead of 0, check for /0/
And you should use an "event load" action, pointing back to "load", (with a message action before it) instead of a redirect.
pd pdforest 16 Oct, 2019
Thanks healyhatman the "event load" did it. I think I don't know some basic concepts so where can I read about events?
​
Thanks,
Pablo
Gr GreyHead 17 Oct, 2019
Hi Pablo,
​
Please try downloading the CFv6 manual from the Downloads page. I'm not sure that it is fully update for the latest release but it will explain the main concepts.
​
Bob
This topic is locked and no more replies can be posted.