You're right it's not. Although you'd get away with <!--- a comment ---> inside the tag (thanks CFBuster!).
Ade -----Original Message----- From: Richard Hensman [mailto:[EMAIL PROTECTED] Sent: 11 May 2005 10:07 To: CF-Newbie Subject: RE: Conditional attributes[Scanned] IIF is a function, not a tag... <cftag1 blah blah <cftag2> blah </cftag2> blah> Yakkety yak </cftag1> Is this valid syntax? *mind boggles at the possibilities, and confusions* -----Original Message----- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: 11 May 2005 09:58 To: CF-Newbie Subject: RE: Conditional attributes[Scanned] Well to be honest I haven't used CFFORM for over years - I hate it...though that said you can use CF tags inside certain other CF tags... You could use an IIF within the checked value to determine if its Yay or Nay.. -----Original Message----- From: Richard Hensman [mailto:[EMAIL PROTECTED] Sent: 11 May 2005 09:51 To: CF-Newbie Subject: RE: Conditional attributes[Scanned] Will this even work if it's a cfinput? Surely you can't use a tag within another cf tag? (between a <cfoutput> and a </cfoutput> yes, but surely not within a <cfinput>. -----Original Message----- From: Stephen Moretti [mailto:[EMAIL PROTECTED] Sent: 11 May 2005 09:48 To: CF-Newbie Subject: Re: Conditional attributes[Scanned] Robertson-Ravo, Neil (RX) wrote: >You do not require IS "true". > >You can just use E.g. ><cfinput > type="radio" > name="myName" > <cfif scope.myName> > checked="yes" > </cfif> > > > >This is better practice. > > Even better practice is to make sure you close your <cfinput> too ;) You might like the inline IF as an alternate. <cfinput type="radio" name="myName" #IIF(scope.myName,DE('checked="yes"),DE(''))#> BTW - there's no real need for cfinput in this instance. You aren't using any of its functionality, so an ordinary <input> will suffice. Stephen ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| All-in-one: antivirus, antispam, firewall for your PC and PDA. Buy Trend Micro PC-cillin Internet Security http://www.houseoffusion.com/banners/view.cfm?bannerid=60 Message: http://www.houseoffusion.com/lists.cfm/link=i:15:915 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
