You can't put cf tags in cf tags like that.

if condition
        checked = yes
else
        checked = no

input checked="#checked#"

Something like that.

Ade

-----Original Message-----
From: Will Tomlinson [mailto:[EMAIL PROTECTED]
Sent: 15 January 2006 10:24
To: CF-Talk
Subject: Conditionally check a cfinput checkbox


Trying to conditionally check my checkboxes depending on the db field being
0 or 1, but it errors.

 <cfinput type="checkbox"
   label="Ships to PO boxes"
    name="shipoptionshiptopobox"
         value="1"
  <cfif getshipoptions.shipoptionshiptopobox EQ 1> checked="yes"</cfif>
  >

The error:
 Invalid token 'c' found on line 71 at column 4.

How do I pre-select the checkbox?

Thanks,
Will


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229606
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to