Thanks for all the responses. cfif within a cfinput does indeed not work. I changed my code to use regular input. Is there a benefit to cfinput over input aside from validation of text?
Also, are there any performance problems with cfif over IIF or vice versa? On May 11, 2005, at 4:58 AM, Robertson-Ravo, Neil (RX) wrote: > 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 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:15:924 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
