Is it possible that both forms react on the same action? This would explain the problem.
In this case you could e.g. use a flowscript to consider which coplet was send (with the copletId) and then save the state in the session.
e.g. you have
<form method="post" action="">
then you have am matcher for "form" in your sitemap that could call a flowscript function
<map:match pattern="form">
<map:call function="form">
<map:parameter name="copletId" value="{request-param:copletid}"/>
</map:call>
</map:match>
and the function could look like this:
function form() {
// get the coplet id
var cid = cocoon.parameters["copletId"];
var pname = cid + "/myform";
if ( cocoon.session.getAttribute(pname) == null ) {
var name = cocoon.request.getParameter("name");
if ( name == null ) {
cocoon.sendPage("page/form", {});
} else {
cocoon.session.setAttribute(pname, name);
cocoon.sendPage("page/received", {"name" : name});
}
} else {
var name = cocoon.session.getAttribute(pname);
cocoon.sendPage("page/content", {"name" : name});
}
}
where page/form, page/received and page/content have to be in you sitemap somehow.
- Coplets in cocoon Anna Bikkina
- Re: Coplets in cocoon Hochleiter
- Re: Coplets in cocoon Anna Bikkina
- Re: Coplets in cocoon Hochleiter
- Re: Coplets in cocoon Anna Bikkina
- Re: Coplets in cocoon Hochleiter
- Re: Coplets in cocoon Philippe Guillard
- Re: Coplets in cocoon Anna Bikkina
