Forums

how to exit form under program control

NickOg 25 Sep, 2014
I want to exit a form if an email address is already in use. I can detect that OK and I could use php main frame->redirect. Is there a cleaner way? A sort of programmatic show stopper? exit or die I know but a bit messy.

Nick
ps I suspect that I should use AJAX before I get that far. One day I must learn how to do that. 🙂
GreyHead 25 Sep, 2014
Hi Nick,

There is a Show Stopper action in CFv4 but that probably isn't what you want.

What do you want to happen when a used Email is found?

Bob
NickOg 25 Sep, 2014
Hi Bob

I use the show stopper but I need to call it from within some PHP code rather than from the form itself. I need to exit from the form and go back to the previous from which it was called.I use a system message to tell the user that the email is NBG.

I just might be making more of a problem than it really is here.

Nick
GreyHead 26 Sep, 2014
Hi Nick,

Mainframe redirect with a message? or,

Use Serverside validation with a redirect on Fail?

I'm not really understanding what the problem is :-(

Bob
NickOg 26 Sep, 2014
I think that is answer enough Bob - I think I was off with the fairies when I began worrying about that.
I haven't looked at that Serverside validation. I must!

Thanks
Nick
This topic is locked and no more replies can be posted.