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 28th, 2003, 05:39 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
edit a form - retrieve values from db and set checkboxes to reflect value

Hi

I have a feedback form which user completes and data is submitted to db. I then want to allow user to edit this form so I retrieve values from db and populate the textboxes. This is working fine. My question is how do I set checkboxes and radio buttons to reflect these values?

It must be something like 'if value is ?? then check the box', but what is the correct syntax and is this code placed within the actual radio box/checkbox?

ie. Radio: <input type="radio" name="Gender" <%if strGender = "1" then value="Check Checkbox" %> />Male

Checkbox Mail <input type="checkbox" name="ReceiveInfoByMail" value="<%=strReceiveInfoByMail%>" />

Thanks!
Lee

Reply With Quote
  #2  
Old October 28th, 2003, 08:08 AM
jmiles jmiles is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 40 jmiles User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
input type="radio" name="Gender" <%if strGender = "1" then%>checked="checked"<%end if%> />Male
Cheers,
Justin

Reply With Quote
  #3  
Old October 28th, 2003, 08:49 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
Thankee, thankee! So exciting when you get something to finally work.
Appreciate it.
Cheers
Lee-Ann

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > edit a form - retrieve values from db and set checkboxes to reflect value


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 6 hosted by Hostway
Stay green...Green IT