Welcome Guest, Not a member yet? Register   Sign In
Break out and return to edit form
#2

[eluser]Dam1an[/eluser]
Hi, the way I normally deal with this sort of thing is as follows

1) Make te first/last option in the drop down "Add new user"
2) When this is selected, it triggers an event via JS, which changes a hidden div below to be visible
3) The now visible div has the required fields for adding a new user, and is part of the same form
4) When the user submits the form, if the "Add new user" entry was selected, first create the new user and insert them into the database and get the ID (using db->insert_id()) and then carry on as normal
Or if it's an existing user, carry on as normal


Messages In This Thread
Break out and return to edit form - by El Forum - 07-06-2009, 01:00 PM
Break out and return to edit form - by El Forum - 07-06-2009, 01:08 PM
Break out and return to edit form - by El Forum - 07-06-2009, 01:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB