Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A very simple checkbox question

Status
Not open for further replies.

programmher

Programmer
May 25, 2000
235
US
I've forgotten how to do this...

I have a query that is retrieving boolean data. I want to reflect the results in a checkbox on my form ("0" for no and "1" for yes).

How do I convert the results from boolean to an actual check on my form?

I've used the "yesnoformat" and "isboolean" options; but still no "check" in the appropriate boxes...
 
Here is a small example from one of my pages. I store the value "Yes" or "No" in my database as a text field. Prior to this, I retreive the data from the database, and if the variable #ServiceFOPEN# is EQ "Yes", the box will be checked.
Code:
<INPUT TYPE=&quot;Checkbox&quot; NAME=&quot;FOPEN&quot;  VALUE=&quot;Yes&quot;<CFIF #SERVICEFOPEN# EQ &quot;Yes&quot;>checked</CFIF>>
Hope this points you in the right direction! Calista :-X
Jedi Knight,
Champion of the Force
 
Calista,

Thanks a million! That worked like a charm. I appreciate your help - and may the force continue to be with you!(*smile*) :-D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top