cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Duncan McLean <>
Subject Re: (Hopefully!) simple question about recalling data in field in cocoon form
Date Sun, 22 Jan 2006 16:46:08 GMT
Jason Johnston wrote:

> 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:
> For additional commands, e-mail:
Hi Jason

Thanks for the prompt reply! If you'll indulge me for a bit longer, can 
I take this a bit further?

Imagine I have a set of form pages that are logically linked (i.e. Page 
A -> Page B -> Page C etc which continue to some kind of final 
processing), is it possible to present
a breadcrumb trail for the user, i.e. if they have completed Page A, B, 
C,etc, can we include some kind of mechanism that will take them back to 
any of the pages they have previously
filled in and be presented with their data? Will I have to bookmark each 
continuation at each page so I can return to that particular point, or 
is there something far simpler involved?

Thanks again


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message