Welcome Guest, Not a member yet? Register   Sign In
Multi-Step Form Data
#9

[eluser]mwmerz[/eluser]
I actually have been searching the forums to find old posts about form processing. Since i've started using code igniter and started reading coding approaches within this community, my code has increased leaps and bounds in professionalism and efficiency. I fully understand many of the methods and theories regarding properly abstracted and written code.

Right now though, as far as forms go, this is my process:
(all using the default load->view parser rather a than templating system)

1. Create generic view for site
2. When calling generic view, i pass a template variable to nest the appropriate view for that method.
3. For a form, load view for step 1, checking to see if session variables are set for the field values, then i have some javascript/dom stuff for field validation. Passing the variables in a session, the user can go through all of the "steps" which all exist in separate methods with separate views. (i.e. Campaign controller manages campaigns. i have a build method which calls the form, i then have a build_process method which acts almost like a controller for the form, if step 2 and 3 aren't complete, it persists the data from step 1 and calls the next appropriate step, if all is complete, and all data is valid, process form into db). But that means every single form i make takes up at least 2 methods. I'm sure i am doubling logic over and over.

While i know it is many times a matter of personal preference, are there guidelines for best practice in setting up forms in an OOP manner? Does anyone have any sample code for form processing? Especially with dom manipulation ruling progressive development, are there best practices for employing dom manipulation within a form? Ie. Radio button with 3 selections, different input types appear based upon appropriate selection?

Thanks, I hope that was clear,

Merzy


Messages In This Thread
Multi-Step Form Data - by El Forum - 11-03-2007, 12:32 PM
Multi-Step Form Data - by El Forum - 11-03-2007, 01:06 PM
Multi-Step Form Data - by El Forum - 11-03-2007, 01:07 PM
Multi-Step Form Data - by El Forum - 11-03-2007, 01:11 PM
Multi-Step Form Data - by El Forum - 11-03-2007, 01:21 PM
Multi-Step Form Data - by El Forum - 11-04-2007, 03:16 PM
Multi-Step Form Data - by El Forum - 11-04-2007, 03:19 PM
Multi-Step Form Data - by El Forum - 11-04-2007, 03:23 PM
Multi-Step Form Data - by El Forum - 11-06-2007, 03:10 PM
Multi-Step Form Data - by El Forum - 11-18-2007, 10:41 AM
Multi-Step Form Data - by El Forum - 11-18-2007, 03:47 PM
Multi-Step Form Data - by El Forum - 11-18-2007, 04:58 PM
Multi-Step Form Data - by El Forum - 11-18-2007, 05:14 PM
Multi-Step Form Data - by El Forum - 11-18-2007, 05:57 PM
Multi-Step Form Data - by El Forum - 11-18-2007, 06:11 PM
Multi-Step Form Data - by El Forum - 11-18-2007, 07:51 PM
Multi-Step Form Data - by El Forum - 01-08-2010, 02:41 PM
Multi-Step Form Data - by El Forum - 08-20-2013, 03:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB