Welcome Guest, Not a member yet? Register   Sign In
Application form in stages
#1

[eluser]Wonder Woman[/eluser]
I have an application form which is made up of three sections and once one section has been filled and completed successfully then the user will be shown the next section and so on. I was hoping once it has been successfully validated then I could use jQuery to slide a new panel on the screen but I don't know the best way of doing this in Codeigniter.

Any ideas would be great thanks.
#2

[eluser]sketchynix[/eluser]
It depends on how you decide to structure the forms. Are you going to have all the forms on the page initially, with some hidden and once it validates have jQuery animate it over? Or are you going to have only one form initially and then get the next form using ajax?

Either way, you will have to have your validation functions check that the required info has been filled out (ie. if you are validating form 2, make sure the info from form 1 has been filled out first).

Another thing to consider is whether or not your users will have javascript enabled.

I have found this plugin useful when dealing with forms, http://jquery.malsup.com/form/

In my controller I usually just have 1 function to serve up the form and 1 to validate it. Let us know if you have more specific questions. There are many ways to implement this.
#3

[eluser]Dennis Rasmussen[/eluser]
Do everything without JavaScript.
Store the temp data in a session or in your database (still a session) if the data is too big.
Then simply create multiple views and functions with form validations for the entire process.

When the above is done, use AJAX to fetch/submit the different stages for the effect.




Theme © iAndrew 2016 - Forum software by © MyBB