put the structure in a persistent scope, session for instance.

instead of variables.foo
use session.foo.

but be sure to cflock it, if race conditions could occur.

....tony

tony weeg
[EMAIL PROTECTED]
www.revolutionwebdesign.com
rEvOlUtIoN wEb DeSiGn
410.334.6331

-----Original Message-----
From: Lola Lee [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 13, 2003 1:18 PM
To: CF-Talk
Subject: Structure Question

I have a project, where I'm trying to set up a page for creating an user
account.  And then validate before inserting into database.  I have the
form fields set up as Variables.foo in the main template, as such:

<cfif Len(ErrMsg) EQ 0>
  <!--- initialze form variables --->
  <cfset Variables.foo = "">
<cfelse>
  <!--- errors found: get data from structure --->
  <cfset Variables.foo = "#stCreatAcct.foo#">
</cfif>

In createacct_rd.cfm (where I'm going to do the validation), I set up a
structure to hold the form fields.  After that I'll have a
validation.cfc to go through each item before determing whether to
return back to the form or to insert into the table.  If ErrMsg is GT 0,
then I have a cflocation going back to the main template with error
messages displaying.  

The problem is that I'm getting an "undefined element" message.  So, how
do I pass the structure back to the main template to repopulate the form
field?  I'm sure there is a way to do this but not through the
cflocation URL since structure is a complex object.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to