ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 24th, 2003, 07:17 AM
leeolive leeolive is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: London
Posts: 43 leeolive User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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

Reply With Quote
  #2  
Old October 26th, 2003, 04:36 PM
Utopia's Avatar
Utopia Utopia is offline
superficial
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: Peterborough, England
Posts: 188 Utopia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 36 m 8 sec
Reputation Power: 7
<select name="etc">
<option value=" & optEtc & ">" & optEtc & "</option>"
</select>

if field = 1 then response.write "checked=""checked"""
end if

etc

Reply With Quote
  #3  
Old October 27th, 2003, 05:41 AM
Pain Pain is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Sheffield, UK
Posts: 94 Pain User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to Pain
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

Reply With Quote
  #4  
Old October 27th, 2003, 01:46 PM
leeolive leeolive is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: London
Posts: 43 leeolive User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > how to allow user to edit details retrieved


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT