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

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
GreyHead 16 Oct, 2019
Hi pdforest,

Do you have an Event Loop action in the fail event of the Event Switcher?

Bob
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
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"
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
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.
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
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.