SitePoint Sponsor |
|
User Tag List
Results 1 to 11 of 11
Thread: Form data (how to save/edit)
-
Mar 20, 2007, 09:46 #1
- Join Date
- Oct 2001
- Posts
- 441
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Form data (how to save/edit)
I hope I can explain this so you understand.
Let's say I have an online form that the user needs to edit. The form is a combination of text-input boxes and drop-down selects and check boxes.
One section on the form is several check boxes that the users is allowed to choose a maximum of 3 boxes.
Right now the user gets a message, upon submitting the edited form, that says "you have selected more than 3 boxes" if they have went over the limit.
Then when they go back to select only 3 boxes the other fields, that they have just edited, that data was not saved.
Is there a method that would allow the just-edited data still in the form so the user doesn't have to retype/re-enter all of it?
-
Mar 20, 2007, 09:58 #2
- Join Date
- May 2003
- Location
- Washington, DC
- Posts
- 10,653
- Mentioned
- 4 Post(s)
- Tagged
- 0 Thread(s)
How to do this has nothing to do with the database, it really depends on what application platform you are using.
-
Mar 20, 2007, 10:05 #3
- Join Date
- Oct 2001
- Posts
- 441
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The coder that is developing the site for me told me:
as you have 2 sets of data: one set before and one set on submit .... so only one can be stored, not 2 ...
-
Mar 20, 2007, 10:48 #4
- Join Date
- May 2003
- Location
- Washington, DC
- Posts
- 10,653
- Mentioned
- 4 Post(s)
- Tagged
- 0 Thread(s)
I really meant PHP or ASP or ASP.NET or RoR or whatever.
Anyhow, what he needs to do is reflect the user's submitted values in the form when returning the error message. Using a little javascript to help prevent posts of invalid data would help.
Your coder probably needs to post the question in the appropriate forum here so he can get the help he needs.
-
Mar 20, 2007, 10:54 #5
- Join Date
- Oct 2001
- Posts
- 441
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Mar 20, 2007, 11:05 #6
- Join Date
- Jul 2002
- Location
- Toronto, Canada
- Posts
- 39,347
- Mentioned
- 63 Post(s)
- Tagged
- 3 Thread(s)
sounds like a closed mind
of course it's possible to retain the partially entered form field values when displaying error messages
any competent programmer can do it
for example, http://www.quirksmode.org/dom/error.html
-
Mar 20, 2007, 11:14 #7
- Join Date
- Oct 2001
- Posts
- 441
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
My coder is telling me that it is possible to retain the form data on a new form but not when editing a form.
The example r937 used is only for the first-time submittal, right?
-
Mar 20, 2007, 11:19 #8
- Join Date
- Dec 2005
- Posts
- 117
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
heh, I really don't mean to sound like a dick, but I hope you're not paying any more than $10/hour for your "developer". He obviously doesn't know what he's doing. I think it's time to find yourself a new developer.
Anyway, it's relatively simple, but it's done within PHP, and has absolutely nothing to do with the database itself. The information shouldn't even hit the database until it's 100% validated.Kiopa Software -- Demo Now Online! Check it out!
Goal: Consolidate all data & tools you use on a daily basis.
Grand opening special, licenses FREE for a limited time.
-
Mar 20, 2007, 11:34 #9
- Join Date
- Jul 2002
- Location
- Toronto, Canada
- Posts
- 39,347
- Mentioned
- 63 Post(s)
- Tagged
- 3 Thread(s)
thread moved to php forum
-
Mar 20, 2007, 11:40 #10
-
Mar 20, 2007, 21:14 #11
- Join Date
- Oct 2001
- Posts
- 441
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Here is the most recent message the coder mentioned to me:
the problem is what all chekcboxes for categories are dynamically generated from db, they are not static and don't have a static name on form, they are together an array. lets move forward.
Does anyone have an example of a form that allows a user to EDIT the form but also retain the edited data as it's validated?
Bookmarks