Forums

Server side validation (change page returned ? )

jrariasf 25 May, 2011
Hi,
I use Chronoforms V3.
I have a form used as the "edit form" of a "chronoconnectivity conection".

I want to make some checks before sending changes to server.
Then I use the "Server Side Validation".
ok, in the help of "Server Side Validation" appears this message:
"Add here some PHP code with tags to get executed on form submission, in case this code returned any data, the form submission will be halted, the form will be reshown and your retruned data will be displayed in a message above the form!"

The question is: Is there a way to make the form NOT to be reshown?
For example, I would like to show the error message and then a link another page.
is it possible?
Thanks a lot.
GreyHead 25 May, 2011
Hi jrariasf,

You can use the code below to redirect the user. But if you do that the form update will not be recorded and the link to ChronoConnectivity lost.
<?php
global $mainframe;
if ( $some_error ) {
  $mainframe->redirect('some_url', 'some_message');
}
?>


Bob
jrariasf 26 May, 2011
Thanks again. You're great !
This topic is locked and no more replies can be posted.