In 2.1.10 I was doing it like this:
My cforms file had two buttons like this:
<fd:submit id="deleteYes" action-command="delete" validate="false">
<fd:label>Yes</fd:label>
</fd:submit>
<fd:submit id="deleteNo" action-command="deleteCancel"
validate="false">
<fd:label>No</fd:label>
</fd:submit>
Then in my flow I had this:
deleteConfirm.showForm("view/deleteConfirm.cforms");
if ("deleteYes".equals (deleteConfirm.submitId)) {
print("YES selected! Delete!");
return;
} else {
message="Deletion cancelled.";
welcome();
return;
}
I'm not sure if things have changed too much in 2.2 but using this
method I could have a number of buttons on a form.
Hope this helps,
Tony
Andre Juffer wrote:
Pavel,
you did use
cocoon.request.getParameter("browse");
instead of
cocoon.request.getParameter();
I assume?
I assume. I wrote in my first response to your question that you form
should include something like the following;
<input type="submit" name="browse" value="browse-1" />
<input type="submit" name="browse" value="browse-2" />
----------------------^^^^
The name attribute is what Jeroen is referring to.
Andre
Jeroen Reijn wrote:
Hi Pavel,
are you using Cocoon Forms or just a plain HTML form? The important
thing while using the plain html form is that your submit buttons should
both have a name attribute.
Regards,
Jeroen
On Wed, 2008-03-12 at 05:24 -0700, navrc wrote:
It doesn't work :-( . From function cocoon.request.getParameter() I
always
obtain NULL.
Pavel Navrkal
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Tony Edwards
Mob: 0411 636 761
Skype: anthony.b.edwards
email: [EMAIL PROTECTED]
http://vomoir.blogspot.com/
begin:vcard
fn:Tony Edwards
n:Edwards;Tony
adr:;;7 Freyberg Street;New Lambton;NSW;2305;Australia
email;internet:[EMAIL PROTECTED]
tel;work:0411 636761
url:http://vomoir.blogspot.com/
version:2.1
end:vcard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]