Sent by FoxWeb Support on 03/20/2002 01:12:24 PM:
You are using the wrong approach to set the default status of the checkbox. Here's an example that does what you want:
<INPUT TYPE="checkbox" NAME="home" VALUE="1" <%=IIF(Request.Form("home") = "1", "checked", "")%>>
The script that receives the posting can use the following code to save the result:
IF Request.Form("home") = "1"
REPLACE home WITH .T.
FoxWeb Support Team
Sent by Joe Goldsmith on 03/20/2002 08:23:35 AM:
If a field type is logical and I use a checkbox on a form for input, how do I use VFP to identify if it is checked or not and then store T or F as the field value please?
I am using for the form field:
<INPUT TYPE="checkbox" NAME="home" VALUE="<%=Request.Form("home")%>">
and then storing the result in:
M.home = Request.Form('home')
before inserting the response into the table field, "home".