You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Upayavira <uv...@upaya.co.uk> on 2004/01/09 13:30:36 UTC

Multiple forms on a page

I have a site that has three forms on a page. Currently, I've 
implemented them as all the same form, but this has its complications. 
How can I implement them separately?

Currently I use code such as:

  var form = new Form("forms/info/info_model.xml");
  form.showForm("internal/info-pipeline", {"auth": auth, "stats": stats, 
"page": page});

If I have:
  var form1 = new Form("form1_model.xml");
  var form2 = new Form("form2_model.xml");
  var form3 = new Form("form3_model.xml");

How do I then show the combined page?

Regards, Upayavira



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Multiple forms on a page

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Jan 9, 2004, at 6:55 AM, Alex Romayev wrote:

> I have a page with 3 forms.  I have implemented each
> form separately and combined the result in one page
> using map:aggregate.
>
> -Alex

Hi Alex,

Can you explain how you get this to work with flow?  The flowscript for 
each form is going to post its own continuation.  When the user submits 
the form, if it doesn't validate then showForm() will call 
cocoon.sendPageAndWait() again.  That invokes your display pipeline 
(the one with the WoodyTemplateTransformer), but this invocation of the 
pipeline is no longer upstream of your aggregating pipeline, its 
"standalone"... so, the external request will be answered with the 
output of the display pipeline, not the aggregating pipeline.

In other words, you'll get just the form, not the whole page.

So — what's the secret? :-)

~ml


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Multiple forms on a page

Posted by Alex Romayev <ro...@yahoo.com>.
I have a page with 3 forms.  I have implemented each
form separately and combined the result in one page
using map:aggregate.

-Alex

--- Upayavira <uv...@upaya.co.uk> wrote:
> I have a site that has three forms on a page.
> Currently, I've 
> implemented them as all the same form, but this has
> its complications. 
> How can I implement them separately?
> 
> Currently I use code such as:
> 
>   var form = new Form("forms/info/info_model.xml");
>   form.showForm("internal/info-pipeline", {"auth":
> auth, "stats": stats, 
> "page": page});
> 
> If I have:
>   var form1 = new Form("form1_model.xml");
>   var form2 = new Form("form2_model.xml");
>   var form3 = new Form("form3_model.xml");
> 
> How do I then show the combined page?
> 
> Regards, Upayavira
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 


=====
Alex Romayev
Software Architect
http://www.romayev.com
romayev@yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org