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