Hi Robert Thanks for the mail.
I have created the WDDX for the session.app and it is storing the variables data. <cfwddx action="cfml2wddx" input="#SESSION.app#" output="wddxtext"> But how would I repopulate the session.app with the wddx packet below when the user logs back in to complete the form? <cfwddx action="wddx2cfml" input="#wddxtext#" output="data"> -----Original Message----- From: Robert Munn [mailto:[EMAIL PROTECTED] Sent: 07 September 2005 17:50 To: CF-Talk Subject: Re: Session Variables and returning to finish web forms Unless you plan to do something with the partially completed application, there is no reason to store it in a normalized way. You could just WDDX session.app and save the resulting packet into a database table; then, when the user comes back you just de-serialize the packet and repopulate session.app. Your table might look something like this: appStore{ userid int NOT NULL (FK), appData text, dateUpdated datetime } >Ok I will use a CFLOCK and CFTransaction for the data processing. > >At present all the data entered in the form is stored as session >variables, which enables the form to be split up over several screens >which works well. > >i.e. > <cfinput name="jobdesc" size="50" required="Yes" message="Please >provide the job description" value="#SESSION.app.jobdesc#" > > >The final option below I am trying to implement into the form and am >just looking for ideas on how this can best be achieved using >Coldfusion. > >If the users have logged in as a member, they have the ability to save >a partially completed online application and complete it later (by >clicking the 'Finish Later' button at the bottom of the form) > >How would this be best achieved ? > >Would you save the form field session variables entered on the form >into a database table with a relationship to the members table ? > >If so when the user returns to the form to complete it what would be >the best way of ensuring that the data returned from the database table >to populate the form fields works in conjunction with the >value="#SESSION.app.jobdesc#" that is set on the form fields by default >that enables the form to be split over several screens ? > >Thanks > >Ian > > > >-----Original Message----- >From: Michael Traher [mailto:[EMAIL PROTECTED] >Sent: 05 September 2005 15:56 >To: CF-Talk >Subject: Re: Session Variables in CFMX 7 > >Hi Ian, Here are a few ideas regarding this. > Best deal with session variables within a CFLOCK statement (see docs >for details of possible race conditions) and therefore a useful way to >go about this is to copy any session structures to the request scope on >each request. > I have a similar 'wizard' style process and I create a structure >(inside >cflock) session.wizard > For each wizard step I create session.wizard.stepN (where N is step >number). > I then duplicate this structure to the request scope so that I can >forget about locking from now on. > In each form page I CFPARAM request.wizard.stepN.formfieldN for all my >form fields for this step with any default values. > When the form is submitted I cfloop thru the form structure and copy >the form values to the request.wizard.stepN.formfieldN values. Finally >I duplicate the request scope to the session scope inside a CFLOCK so >the values are remembered to the next request. > In terms of keeping this data in some way, you might consider using >CFWDDX which can convert complex CFML variables (like your wizard >structure) and convert them to a XML string. You could then write this >string to a file or database. CFWDDX can then be used to convert it >back again. There are many ways to store this data but this in my mind >would be the neatest. > HTH >Mike > > > On 9/5/05, Ian Vaughan <[EMAIL PROTECTED]> wrote: >> >> Hi >> >> I am starting constructing a form using session variables for >> multiple ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217607 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

