PDA

View Full Version : Checkbox to show checked


edgarv
12-07-2005, 04:45 PM
I have a ASP form with a few check boxes, text fields and date fields.
When ever I fill my form I can see all the data in my table. but When I go to my update page I can only see the text and the dates. all the checkboxes are blank. How can I show the checkboxes that have been checked?

this is what I have so far
<input type="checkbox" name="custom" value="<% = rsGuestbook("custom") %>" and then I put a <% = rsGuestbook("standard") %> just to see if the field was checked

somebody suggested to do this


<input type="checkbox" name="custom" value="rsGuestbook("custom") = Len(Request.Form("custom")) > 0
but it still does not work, if I put the <% = rsGuestbook("standard") %> to see the value it gives me a 0 even if the check box is not checked.

Help please this is drivingme nuts

Thaks Edgar V

hinch
12-07-2005, 05:51 PM
it'd be something like this

<input type="checkbox" name="custom" value="<% = rsGuestbook("custom") %>" <% if rsGuestbook("standard") <> rsGuestbook("custom") then response.write "checked" end if%> >

the checked word needs to be in your input tag to make it appear as checked