views:

67

answers:

1

Heres what I'm trying to do.

I want to have a homepage with my signup form that doesn't refresh the page every time a validation step is failed.

I want my signup form to have 2 steps.

1st step signup form fields and date dropdown.. when all this is passed successfully then it will forward to captcha without refreshing the page or maybe even popup with captcha. When the captcha is successfull passed the user will be registered.

Currently when validation is passed my controller loads a view submit_success.php..

What is the best way to achieve what I'm trying to do?

Ajax? Javascript?

Are there any codeigniter tutorials you can point me to?

Or would you be able to give me an example?

+1  A: 

You could make ajax calls back to CI for validation using $.ajax or $.post, that way you only have to create your validation rules in CI.

Here's an example I found to get you started: http://stackoverflow.com/questions/2331389/jquery-post-codeigniter-validation/2331527#2331527

And Here's a CodeIgniter example of Captcha with ajax: http://www.99points.info/2010/03/verify-captcha-with-ajax-using-codeignite/

Mitchell McKenna
Thanks for the response. I'm having a hard time trying to warp my head around the ajax thing but I've found something that might be of good use to me.
Psychonetics
http://flowplayer.org/tools/demos/validator/server-side.html <--what do you think of this? Is it ideal from what I'm trying to do?
Psychonetics