ahh seems like a cool trick and alot less code.... but i get this error...

You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members

70 : <cfset StructAppend(session['stcFormFields'],form)>
  ----- Original Message -----
  From: Michael T. Tangorre
  To: CF-Talk
  Sent: Tuesday, July 13, 2004 10:07 PM
  Subject: RE: GRRRRR Session problems

  > Ive got a multi step form that each time it is submited, I
  > loop the form.fieldnames into session vars...
  > <cfset session.pl = StructNew()>
  > <cfloop list="#form.fieldnames#" index="i"> <cfset
  > session.pl[i] - form[i]> </cfloop>

  No need to loop... Although you can if you want :-)
  <cfparam name="session['stcFormFields']" default="">

  To save the form fields from the first form:
  <cfset StructAppend(session['stcFormFields'],form)>

  To save the second form:
  <cfset StructAppend(session['stcFormFields'],form)>

  To save the third form:
  <cfset StructAppend(session['stcFormFields'],form)>

  So on and so forth. Now all your form values are inside the stcFormFields
  structure.

  HTH,

  Mike
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to