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 name="getThis">
        query here
</cfquery>

<!--- Make sure that the getThis query.recordcount has contents --->
<cfparam name="getThis.columnlist" default="#getThis.columnlist#">

<cfloop index="field" list="#getThis.columnlist#">
        <cfparam name="CLIENT.#field#" default="#Evaluate("getThis."&field)#">
</cfloop>

<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->

-----Original Message-----
From: Mike | NZSolutions Ltd [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 16, 2005 5:39 PM
To: CF-Talk
Subject: Cfparam question


I have a very long form - 30 or so questions. Not all of the questions
are required and not all are submitted through to the processing page.

Can I use a loop to set a default value for each form element with out
having to use...

<cfparam name="FORM.abc" default="">
<cfparam name="FORM.def" default="">

Mike


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224535
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