|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
how to allow user to edit details retrieved
Hi
I have a feedback form which asks someone to enter their personal details and then submits them to db. There are input, checkboxes and selection boxes on form. Now I want to allow user to edit this form. When user clicks 'edit', I retrieve all the values from db and populate the text boxes. What happens with the options and checkboxes. How can I get these to reflect what their values in db? Also I have some drop downs allowing user to select date of birth ie. day drop down, month drop down and year drop down. How do I show user the details we have for them if I'm using drop downs? How do you guys/gals do this? Confused. Thanks! Lee |
|
#2
|
||||
|
||||
|
<select name="etc">
<option value=" & optEtc & ">" & optEtc & "</option>" </select> if field = 1 then response.write "checked=""checked""" end if etc |
|
#3
|
|||
|
|||
|
I guess you could dynamically build up a form, along with the select statement to retrieve the data and then as the form is being built, you can specify as and when the "default" values for each form item (which would be taken from the results from the query search)
So rather than having a blank form, you would have a form with the details already in place, and you can chop/change at will, and then submit them when clicking submit ![]() |
|
#4
|
|||
|
|||
|
Hi
Thanks for your help with this! Utopia I used your suggestion to reflect the values retrieved in my 'edit form'. I have got the textboxes and options working but can't seem to get the radio button values to reflect the value retrieved. 1. I retrieve the gender value from db (M or F), place in variable and do a check to set the value as 1 or 2 Dim strGender strGender = rsrecords("Gender") if strGender="M" then strGender = "1" else strGender = "2" end if 2. I need to get radio to reflect this value <input type="radio" name="Gender" <%if strGender = "1" then "checked="checked""%> />Male I think it's the syntax... Any ideas? Thanks Lee |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > how to allow user to edit details retrieved |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|