Why does DBSave action still execute if there is a redirect before it? I need to re-direct if someone presses the Cancel button.
I don't think that it does. There's not enough information here to say much else.
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
I put something like this in a custom code block BEFORE DBSave on the On Submit event:-
<?php header( 'Location: http://www.yoursite.com/' ) ; ?>
It re-directs to the URL OK, but then it executes DB Save which is not what I want.
I put a Show Stopper after custom code and that stops DB Save from executing but that means DB Save will never execute!
As I said, there wasn't enough information to say much.
If you want to redirect then either the ChronoForms ReDirect action, or a custom code action using $mainframe->redirect() will do it.
I'm not sure what your PHP does but I suspect it has no effect until the next page is displayed.
2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com