Why does DBSave action still execute if there is a redirect before it? I need to re-direct if someone presses the Cancel button.
Hi peterswa62,
I don't think that it does. There's not enough information here to say much else.
Bob
I don't think that it does. There's not enough information here to say much else.
Bob
It does!
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!
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!
Hi peterswa62,
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.
Bob
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.
Bob
This topic is locked and no more replies can be posted.