Welcome Guest, Not a member yet? Register   Sign In
Best way to add/edit a listing
#5

[eluser]Crimp[/eluser]
I do this the exact same way: using the presence of segment 3 as a switch.

However, I do pass an action variable to the view, $data['action'] = new or edit, to make it easier to keep up with the code.

I use this to keep multiple versions of the "same" form in the same view.

One example would be a user registration/profile form where new sign-ups require username, password and repeat password and the edit version requires old password, new password and repeat new password.

I then set all those fields in the view based on the action var.


Messages In This Thread
Best way to add/edit a listing - by El Forum - 10-31-2008, 06:06 PM
Best way to add/edit a listing - by El Forum - 10-31-2008, 06:30 PM
Best way to add/edit a listing - by El Forum - 10-31-2008, 06:47 PM
Best way to add/edit a listing - by El Forum - 10-31-2008, 09:30 PM
Best way to add/edit a listing - by El Forum - 11-01-2008, 03:15 AM
Best way to add/edit a listing - by El Forum - 11-01-2008, 05:48 AM
Best way to add/edit a listing - by El Forum - 11-01-2008, 10:13 AM
Best way to add/edit a listing - by El Forum - 11-01-2008, 10:58 AM
Best way to add/edit a listing - by El Forum - 11-01-2008, 12:06 PM
Best way to add/edit a listing - by El Forum - 11-01-2008, 06:23 PM
Best way to add/edit a listing - by El Forum - 11-01-2008, 06:24 PM
Best way to add/edit a listing - by El Forum - 11-01-2008, 07:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB