I'm trying to figure out how I can pass request collection variables
to create a wizard like process. I have a handler that has these
<!--- Show Form Step 1 --->
<!--- Process Form Step 1 --->
<cfset setNextEvent( event=rc.xehStepTwo,persist="rcKey1" ) />
<!--- Show Form Step 2 --->
<!--- HERE IS MY ISSUE, how can I get the value of rcKey1 here??
without using a hidden field on the form in Step 2 or the session
I'm trying to avoid using the session scope and hidden form fields
and I think it's possible, but I'm wondering if having this processing
step in between each form is causing my problem?
Any help appreciated, hope this makes sense.
It should be in your rc, assuming rc.rcKey1 already exists before you call setNextEvent in processStep1.
Do you have a value for coldbox.FlashURLPersistScope in coldbox.cfc?
Thanks for the reply. The value is being passed when I call
setNextEvent, but on "dspStep2" I have a form and when I submit that
form, the variables from the initial setNextEvent() call aren't
there. I don't want to put a hidden form field on the form to pass
them along unless I absolutely have to. I was hoping I could persist
the values somehow when I'm not calling setNextEvent().
I know I can use the session scope but I thought using FlashRam might
work but it doesn't look like it can do this unless I'm mistaken.
You would then also need to put the value into flash ram in step 2's event. They persist for one event lifecycle.
It keeps the values across setNextEvent calls but now when I submit my
form. On the page that displays the form the value is available but
the only way to keep it moving through the steps seems to be to use a
hidden field on my form.
In other words, when the page refrshes or the form is posted the
values are lost. When you submit a form there isn't any
You can disable the Flash “cleanup” so these values just keep living in the persistent scope and get re-inflated upon each request.