[thelist] CF: Persistent variables from a loop. How?

Frank framar at interlog.com
Wed May 9 20:44:41 CDT 2001


Can someone suggest a way whereby I can use a loop to create a 
persistent variable? Here is an example to illustrate what I'm trying 
to accomplish:

<!--- Define a list of fields in a form --->
    <cfset TheList="Name,Email,Address">

<!--- Set the defaults --->
    <cfloop index="TheList">
       <cfparam name="Form.#index#" default="">
    </cfloop>

As it stands, obviously, the only one that persists is the last, 
since each iteration destroys the previous one. So, what would be a 
good way of making them all stick?
-- 

Where there's a will, there's a way.

Frank Marion                      Loofah Communications
frank at loofahcom.com               http://www.loofahcom.com




More information about the thelist mailing list