> nor was I talking about doing any params at all.

Maybe this threw me a little?

> cfparam just needs to be done on the PK so that by default 
> it is equal to a non-existant one such as ID = 0

The form submitting to itself (like most do for validation purposes) was a
"scenario" as to why it’s a bad idea to do what you described.

Im not saying don’t use any part of your suggestion... just use the query
results to default values that MIGHT not exist. It will save th user from
re-entering data they already entered once if any validation fails.

1) get the query record
2) set their values to default form variables with cfparams
3) use the #form.fieldnames# from the params for the value attributes



..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com


-----Original Message-----
From: Aaron Rouse [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 17, 2005 11:41 PM
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, an all around bad idea. Why bother setting a param for it at all?
> The
> query will always take care of setting the value and the param will not be
> used. The only good the cfparam would be would be to set the query value
> to
> another var like form.fieldname
>
> If you use that value to set a param for a form field like form.fieldname
> and then use #form.fieldname# as the value="#form.fieldname#", whatever is
> in that field when you submit the form can persist incase there were
> errors
> that you wanted to inform the user about.
>
> As you are saying, if you submit the form to itself and any server side
> checks fail and the user is shown the form so they can correct any
> problems,
> all of their entered data is gone and all of your original information is
> back.
>
> Make sense?
>
>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:4:224594
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to