Duncan McLean wrote:
Hi

I've been playing with one of the cforms samples (registration) that comes with Cocoon and have noticed that if you type in data and submit, and return to that page and reload, that values in the text boxes disappear.

I thought these get preserved, or is there some programmatic effort in retrieving them?

Following a similar (2-step) example, carselector, which uses selection lists, I notice that if you submit and then return to the page, the values are preserved even after a reload. I notice that in the template there are "submit-on-change" tags for each of the drop-downs.

Can someone explain to this layman, the differences and how I can recall/reload already submitted data that don't have this submit-on-change instruction.

I believe the difference is that the values are only preserved when you are going back to a continuation. In the first sample it sounds like you are going back to the form's initial URL (not a continuation) whereas in the second example you're going back to the page that's a result of a continuation (triggered by the submit-on-change).

Here's the general rule: If you go back to the first page request in a form's flow, the fields will all be blank, because the initial URL starts a new flow and creates a new (blank) Form object. If you go back to a continuation, then the fields will display the values that were last submitted by the user, because those are the values carried in the Form object shared by all those continuations. That last part is an important detail: the flow does not keep track of the form state for each and every continuation, only the current state of the form as a whole.

Hope that helps
--Jason



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]