First better way: Don't use strings for booleans! <cfinput type="radio" name="myField" id="myField" value="myValue" checked="#IIF(something eq 'somethingelse', 1, 0)#" />
Second better way: Don't write "if True then True else False"! <cfinput type="radio" name="myField" id="myField" value="myValue" checked="#(something eq 'somethingelse')#" /> (parenthesis are unnecessary here, but I feel they make it more readable) Third better way: Don't use cfform! <form:select id="myField" options="myValue" value="somethingelse"/> (that's from my form custom tag library, not yet released) :) > I'm assuming there is a noticeable difference in using IFF? Recently > I've been using it quite heavily in forms now i.e. > > <cfinput type="radio" name="myField" id="myField" value="myValue" > checked="#IIF(something eq 'somethingelse', DE('Yes'), DE('No'))#" /> > > Are there better ways of doing this? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 and Flex 2 Build sales & marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273508 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4