Again I was not talking about a form submitting to itself.
As far as my comment about not doing params at all, I was referencing doing
them for any of the FORM scope but figured that was obvious by this point.
On 11/17/05, Bobby Hartsfield [EMAIL PROTECTED] wrote:
nor was I talking about
I've done this before. In my admin pages, MOST of the text fields are tied
directly to database fields of the same name. In the edit portion of the
code, I select all of the information for that record, then use the
columnlist attribute of the cfquery to loop over a cfparam tag like so:
cfquery
.
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 17, 2005 3:36 PM
To: CF-Talk
Subject: RE: Cfparam question
I've done this before. In my admin pages, MOST of the text fields are tied
If you did want the value to be that of what is in the database. Why not
just put it in the html tags, when the query returned a zero record count
you would get blank values put in so an empty form. When it returned the
record then you get what was populated/inserted.
On 11/17/05, Bobby
, November 17, 2005 4:22 PM
To: CF-Talk
Subject: Re: Cfparam question
If you did want the value to be that of what is in the database. Why not
just put it in the html tags, when the query returned a zero record count
you would get blank values put in so an empty form. When it returned the
record
It does work, our POS framework at work does it. A query with zero record
count returns blanks for the fields. At the top of a form that is used for
both input and updating a query can run to pull out all the fields and then
a cfparam just needs to be done on the PK so that by default it is equal
:[EMAIL PROTECTED]
Sent: Thursday, November 17, 2005 10:38 PM
To: CF-Talk
Subject: Re: Cfparam question
It does work, our POS framework at work does it. A query with zero record
count returns blanks for the fields. At the top of a form that is used for
both input and updating a query can run to pull
You are not following what I am describing, we are talking about two
seperate scenarios entirely. I was not talking about a form submitting to
itself nor was I talking about doing any params at all.
On 11/17/05, Bobby Hartsfield [EMAIL PROTECTED] wrote:
Again, an all around bad idea. Why bother
To: CF-Talk
Subject: Re: Cfparam question
You are not following what I am describing, we are talking about two
seperate scenarios entirely. I was not talking about a form submitting to
itself nor was I talking about doing any params at all.
On 11/17/05, Bobby Hartsfield [EMAIL PROTECTED] wrote:
Again
sure. assuming the fields are named appropriately...
cfloop from=1 to=30 index=i
cfparam name=form['field' i] default= /
/cfloop
would set form.field1 - form.field30 to empty default values.
but unless they're checkboxes (or radio groups with no buttons
checked), they'll still get passed
This seems to work...
cfloop list=#fieldnames# index=Request.idx
cfparam name=FORM.#Request.idx# default=
/cfloop
However, the radio items (no radio item is initially selected for any
question) are not passed through to the form.
-Original Message-
From: Mike | NZSolutions Ltd
see my previous response :)
basically you really only need to param checkboxes and radio button
groups that don't have a button checked by default.
On 11/16/05, Mike | NZSolutions Ltd [EMAIL PROTECTED] wrote:
This seems to work...
cfloop list=#fieldnames# index=Request.idx
cfparam
Right - think about it - cfparam says, If foo doesn't exist, make it.
So, only the first cfparam will do anything.
===
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
Email: [EMAIL PROTECTED]
Yahoo IM :
The reason that the second CFPARAM will not
process as it states IF FOO does not exist,
then set it to BOO
However when the first instant was encounter
FOO was defaulted to: BAR
Thus now FOO exists and the 2nd PARAM will not
be executed.
What are you trying to do???
If you need foo to be BOO
-Original Message-
From: Tony Schreiber [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 11:06 AM
To: CF-Talk
Subject: CFPARAM Question
Do subsequent CFPARAMS of the same variable overwrite each other? I
thought so, but they don't seem to.
CFPARAM NAME=foo DEFAULT=bar
CF Param is working as it's supposed to. CFPARAM encapsulates the follow
ing
logic:
Your first cfparam does this
IF ( NOT IsDefined('foo') ) { foo = bar; }
Your second one does this.
IF ( NOT IsDefined('foo') ) { foo = boo; }
The first one executes and defines foo and
Is there a way to duplicate my intended behavior another way?
Yes, don't use cfparam in the second instance, use a condition.
cfif foo IS bar
cfset foo = boo
/cfif
That will, in essence, param the variable to boo if the variable hadn't
been touched since the initial param.
Nope it would not overwrite.
CFPARAM works like this:
If the variable does not exist it will create it and set whatever default value you
specify. So
when the second CFPARAM is called it will NOT create the var and a set a value because
it already
exists.
To reset the var use CFSET in place
No, CFPARAM writes the variable only if it does not exist, so the
second CFPARAM will never get executed. What you have is essentially
this:
CFIF NOT IsDefined(foo)
CFSET foo=bar
/CFIF
CFIF NOT IsDefined(foo)
CFSET foo=boo
/CFIF
--- Ben
-Original Message-
From: Tony Schreiber
Pound signs!
cfparam name="#client.CustomerCompany#"
default="#qGetCorpInfo.CorporateName#",
-Original Message-
From: Stas Newdel
To: CFTalk
Sent: 28/08/00 1:23 PM
Subject: cfparam question
Hello,
I'm trying to do this:
cfparam name="client.CustomerCompany"
Milks, Jim [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 28, 2000 1:29 PM
To: '[EMAIL PROTECTED]'
Subject: RE: cfparam question
Pound signs!
cfparam name="#client.CustomerCompany#"
default="#qGetCorpInfo.CorporateName#",
-Original Message-
From: Stas Newdel
To:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Pound signs!
cfparam name="#client.CustomerCompany#"
default="#qGetCorpInfo.CorporateName#",
Too many pound signs! The variable name is assumed to be a string,
so this will probably cause the same problem as the IsDefined thingus
from last
Terribly sorry all! I did eroneously include pound signs in the name.
Lashings complete...
JM
-Original Message-
From: Zachary Bedell
To: '[EMAIL PROTECTED]'
Sent: 28/08/00 1:49 PM
Subject: RE: cfparam question
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Pound signs!
cfparam
23 matches
Mail list logo