1) why don't you use form.alignHEAD instead of thisNL.alignHEAD? if you must use thisNL, then maybe add <cfset thisNL = structnew()> before your cfparam tag... 2) you don't need those # inside len(trim()) 3) your cfif block is redundant - you already set your var with cfparam if it does not exist
Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Les Mizzell wrote: > The below is on a page to add or edit records. > When you visit the page, if no recordset is returned by the query, it > will ADD when the form is submitted. If a record is returned, it will > update. Standard stuff.. > > Small problem I'm having - I need to set a few default values to check > some checkboxes. Here's what I've got: > > <cfparam name="thisNL.alignHEAD" default="rgt" /> > > <cfif NOT len(trim(#thisNL.alignHEAD#))> > <cfset thisNL.alignHEAD ="rgt" /> > </cfif> > > <input name="alignHEAD" > type="radio" > value="alignnltLEFT" > <cfif thisNL.alignHEAD EQ "rgt">checked="checked"</cfif> /> > > So, if no recordset is returned, then "thisNL.alignHEAD" *should* be set > as a default to "rgt". Problem is, the above isn't working. > "thisNL.alignHEAD" is either null, a blank value or *something* and it's > not getting preset to check the default box. > > Not sure what I've got wrong. Ideas? > > LGM > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307044 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4