Persists form variables

I need to persists the form variables so they can be used later in the code. So my parent screen is the search. When I click on search it will open up the popup window with the report . The report will contains links. Upon clicking on the link it will open up another popup when user can update the content. Now I need to refresh the report itself in order to see the changes. By I am keep losing all my form variable. Form variables names are dynamic so I do not know them in advanced. I tried using persistsRC, but does not seems to be working

maybe looping over rc.fieldnames and create a flash?

Use the Flash plugin.

I did for the variable name that I already know but what if I have set of form variables that have a dynamic names. Can i loop over fieldnames and create a flassh for each one of them?

How can I do that ?

Just flash the scope.

I am sure it takes a collection, and save you the trouble of looping over the structure.

can i do something like this
flash.put(name=‘rc’,value=rc,keep=‘true’,inflateToRC=‘true’, autoPurge=‘false’);

Except in your case the value would be set to form. And name is the key you would like to reference it by. So this would should be something more unique than rc, maybe contactForm or invoiceForm or something that reflects what it is.

it does not work .

Have you tried something like this?!topic/coldbox/o118bWE-Cl4

When you say doesn’t work, what doesn’t work. How are you pulling it back out of the scope, are you assuming that it is automatically pulled back into the required scope?

If the above link doesn’t help then maybe look up and read the docs here

I use the FormUtilities plugin for this. Google "FormUtilities plugin
for coldbox".

That should not make any difference, except that you will need to use the variable name your are saving it do instead of the value = form in your persisting with flash.

when I said it does not I reffered to the fact that the rc does not get created in the flash RAm

flash.put(name=‘contactForm’,value=rc,keep=‘true’,inflateToRC=‘true’, autoPurge=‘false’);

Also I already read that article and tried to do everuthing that is explained there but no luck

can you show some examples

How do you know it is not? Are you expecting it to automatically get it back out for you?

How are you getting a reference to it later to use?

So after reading the docs, you can’t work it out?

You say it is not working, but you haven’t actually said what you are trying to get it with.

Google, is a fascinating piece of technology at times.

<cfif flash.exists(“forgeboxInstallLog”)>

Installation Log


well Initially I am setting the variables to the popup via rc, But then i have links thta do some processing and refresh the page that where I losing all the variables

In your ColdBox config what scope is the flash ram set up to use?

it sets to use session

So if it;s being persisted in the session, how are you getting it back out of the flash ram?

You mention it is not being persisted, but you really need to give us more on how your trying to get at it.