[thelist] CF smoke and mirrors

Chris Evans chris at fuseware.com
Thu Jul 19 12:57:35 CDT 2001


If you are talking about the action page, you can use the pre-existing FORM
structure to get a list of fields passed in, then loop over the list to
initialize those local variables:

<CFLOOP List="#StructKeyList(Form)#" index="field">
	<CFPARAM Name="#field#" default="">
</CFLOOP>

Something like that might work.

Chris Evans
chris at fuseware.com
http://www.fuseware.com



-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of
Rory.Plaire at wahchang.com
Sent: Thursday, July 19, 2001 1:45 PM
To: thelist at lists.evolt.org
Subject: RE: [thelist] CF smoke and mirrors


| Maybe if you
| can explain the problem you are trying to solve a little better?
|

Well,

You asked for it. 8)

Each page has a form, each form a number of fields (of course). When the
page loads, the fields its form contains determines which javascript
functions to validate them on the client side are loaded into the page.
Since they are loaded from a database, I don't know what the fields are
named for any arbitrary form, so I was looking for a way to dynamically
allocate the space and variable for each field in CF on return of the form,
which could then be looped through, accessed for a value, it elements used
as placeholder values, etc.

Currently I think that I will use a structure and the function StructInsert
to build a collection of pages' form's fields... what do you think?

<rory disposition="thankful" alt="8)"/>

---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !






More information about the thelist mailing list