multi-step form

All,

has anyone attempted this in coldbox...?

curious on methods of handling this...

Something like that?

http://vokle.com/open-source/examples/babysteps/index.html

yes. but via coldbox (cfml). not js...

Hey Sal, what exactly is the challenge you are facing? I could put
this together pretty quickly for you if you can define your goal.

just a typical wizard like form...

being able to browse forward and backwards while persisting the data
in an object (in memory) until last step, then write to db...
something similar to that.

any thoughts?

Sal. I would probably follow the workflow to something like this:

handler: myForm and a new event for each of these wizard forms

wizard1
wizard2
wizard3
wizard_final

start off with index (or wizard1)
- 1. display wizard1 form
- 2. user enters data, hits submit
  - 3. if validated, saveformdata to session, setNextEvent
('myForm.wizard2'), if not go back to step 2

- 4. display wizard2 form
- 5. user enters data, hits submit
  - 6. if validated, saveformdata to session, setNextEvent
('myForm.wizard3'), if not go back to step 5

- 7. display wizard3 form
- 8. user enters data, hits submit
  - 9. if validated, saveformdata to session, setNextEvent
('myForm.wizard_final'), if not go back to step 8

10. Insert/update all saved data from session, clear out session, show
complete page

Naturally, you will also want to track how far along in the wizard
they have gone so that they can't access a different step in the
wizard that they havn't yet went to via the wizard. Maybe another
event called goToStep which simply forwards on to the correct event

<cffunction name="goTo" output="false" returntype="null">
<cfset rc = event.getCollection()>
<cfset event.noRender()>

<cfif rc.valueExists('step')>
   <cfset setNextEvent('myForm.' & rc.getTrimValue('step')>
</cfif>
</cffunction>