Setting a default value

2008-09-05 Thread Les Mizzell
In the scenerio below, how would I set a default value - 99 maybe - for form.group_sort_#gpIDX# - if the form field was left blank? cfloop index=idx list=#FORM.GROUPid# cfquery name=update UPDATE MyTable SET group_sort = #evaluate(form.group_sort_#gpIDX#)# where link_group =

Re: Setting a default value

2008-09-05 Thread Brad Wood
- Original Message - From: Les Mizzell [EMAIL PROTECTED] In the scenerio below, how would I set a default value - 99 maybe - for form.group_sort_#gpIDX# - if the form field was left blank? I'm sure there are many ways, but this should work. Also, don't forget to secure those

Re: Setting a default value

2008-09-05 Thread Aaron Rouse
You could do this, it assumes the form element would always be passed but might be blank. If the form element may not get passed then you could do a cfparam but that would not handle if it passed and blank. Also I assumed #gpIDX# was really supposed to be #idx# cfloop index=idx

Re: Setting a default value

2008-09-05 Thread Aaron Rouse
Erf, I left off some pound signs on the where clause where link_group = '#Form[thisGROUP_#idx#]#' On Fri, Sep 5, 2008 at 10:32 AM, Aaron Rouse [EMAIL PROTECTED] wrote: You could do this, it assumes the form element would always be passed but might be blank. If the form element may not get

Re: Setting a default value and dynamically checking a radio button

2008-06-09 Thread TechInfo
Les Mizzell wrote: The only thing I can find that works is: cfif thisNL.alignHEAD EQ rgt or thisNL.recordcount NEQ 1 checked=checked /cfif Which is a little uglier that setting thisNL.alignHEAD to rgt by default if it isn't anything else. If thisNL is a query, you CAN reset a

RE: Setting a default value and dynamically checking a radio button

2008-06-09 Thread Bobby Hartsfield
: Setting a default value and dynamically checking a radio button Les Mizzell wrote: The only thing I can find that works is: cfif thisNL.alignHEAD EQ rgt or thisNL.recordcount NEQ 1 checked=checked /cfif Which is a little uglier that setting thisNL.alignHEAD to rgt by default

Re: Setting a default value and dynamically checking a radio button

2008-06-08 Thread Azadi Saryev
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

Re: Setting a default value and dynamically checking a radio button

2008-06-08 Thread Les Mizzell
3) your cfif block is redundant - you already set your var with cfparam if it does not exist I had both there testing to see if one of them would catch the null/empty value and set the variable. *Neither* is catching is, so it's not getting set. So, looking at it again. I want the first

Re: Setting a default value and dynamically checking a radio button

2008-06-08 Thread Les Mizzell
If I do cfoutput#thisNL.alignHEAD#/cfoutput - these nothing there, , so I'm not sure why the below won't set the varialbe to rgt in this case. cfif NOT len(trim(thisNL.alignHEAD)) cfset thisNL.alignHEAD =rgt / /cfif This works: cfif thisNL.recordcount EQ 0 cfset

Re: Setting a default value and dynamically checking a radio button

2008-06-08 Thread Les Mizzell
cfif thisNL.recordcount EQ 0 cfset thisNL.alignHEAD =rgt / /cfif Spoke too quick - no it doesn't. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

RE: Setting a default value and dynamically checking a radio button

2008-06-08 Thread Bobby Hartsfield
10:16 AM To: CF-Talk Subject: Re: Setting a default value and dynamically checking a radio button If I do cfoutput#thisNL.alignHEAD#/cfoutput - these nothing there, , so I'm not sure why the below won't set the varialbe to rgt in this case. cfif NOT len(trim(thisNL.alignHEAD)) cfset

RE: Setting a default value and dynamically checking a radio button

2008-06-08 Thread Bobby Hartsfield
to decide whether or not to check the box/radio ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: Sunday, June 08, 2008 10:16 AM To: CF-Talk Subject: Re: Setting a default value

Re: Setting a default value and dynamically checking a radio button

2008-06-08 Thread Les Mizzell
The only thing I can find that works is: cfif thisNL.alignHEAD EQ rgt or thisNL.recordcount NEQ 1 checked=checked /cfif Which is a little uglier that setting thisNL.alignHEAD to rgt by default if it isn't anything else.

Setting a default value and dynamically checking a radio button

2008-06-07 Thread Les Mizzell
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

setting a default value in my SELECT tag

2004-08-18 Thread Chris Kavanagh
Dear list, I'm sure there is a simple answer to this basic question.Sorry for being such a noob: I'm working on my first application!I hope to become a useful member of the CF community one day.But first you will have to put up with my stupid questions for a while. Stupid question the second:

Re: setting a default value in my SELECT tag

2004-08-18 Thread Ewok
try this on for size SELECT name=project CFOUTPUT query=get_projects OPTION value=#ID#cfif ID is get_details.ID selected/cfif#projectname#/OPTION /CFOUTPUT /SELECT - Original Message - From: Chris Kavanagh To: CF-Talk Sent: Wednesday, August 18, 2004 8:33 PM Subject: setting a default

SOLVED: setting a default value in my SELECT tag

2004-08-18 Thread Chris Kavanagh
-Talk   Sent: Wednesday, August 18, 2004 8:33 PM   Subject: setting a default value in my SELECT tag   Dear list,   I'm sure there is a simple answer to this basic question.  Sorry for   being such a noob: I'm working on my first application!  I hope to   become a useful member of the CF community

Re: setting a default value in my SELECT tag

2004-08-18 Thread Dick Applebaum
=get_projects OPTION value=#ID#cfif ID is get_details.ID selected/cfif#projectname#/OPTION /CFOUTPUT /SELECT   - Original Message -   From: Chris Kavanagh   To: CF-Talk   Sent: Wednesday, August 18, 2004 8:33 PM   Subject: setting a default value in my SELECT tag   Dear list,   I'm sure

Re: SOLVED: setting a default value in my SELECT tag

2004-08-18 Thread Ewok
we all cringe at our first app(s) .. or atleast I hope WE do : ) glad to help and good luck! - Original Message - From: Chris Kavanagh To: CF-Talk Sent: Wednesday, August 18, 2004 9:05 PM Subject: SOLVED: setting a default value in my SELECT tag Dear Ewok, Thank you, you're