Hi Niclas,
it might be that you are misunderstanding my example.
If I was correct you wanted to know which button you pressed in the form
right?
You can find that out with 'form.submitId'.
The example shows how to do some actions based on the value of the
submitId, which is being evaluated in the switch statement.
Kind regards,
Jeroen Reijn
ZongoZongo wrote:
The Problem is, that the forms are generated dynamically. So i dont now which
buttons eaven exists.
I hoped I could commit a set of variables that are transered depending on
the button.
Jeroen Reijn wrote:
Hi Niclas,
If you've defined the submit button as an fd:submit, you can react in
flow based on the submitId of the form.
You can request the submitId from flow by using:
form.submitId
Example:
form.showForm();
switch(form.submitId) {
case "details":
showDetails();
break;
case "create":
createNew();
break;
case "ok":
redisplayForm = false;
processForm(form);
break;
}
I hope this helps you out.
Kind regards,
Jeroen Reijn
ZongoZongo wrote:
Hi
Couldnt solve the problem. But I am now using cforms. Inside the
definition
of the submitbutton you can set the <attribute/> tags.
But the problem stays the same. How can I find out which button has been
pressed und how can I extract the attributes? Please help. This is very
fundamtel for my further work :-(
greetings,
Niclas
ZongoZongo wrote:
Hi
One simple short question :-)
How can I get the name of the submitbutton that has been pressed in a
form
(inside flowscript).
something like cocoon.request.getpressedButton() :-)
By the way, I am not using CForms. But I think, that doesnt change
anything.
THX,
Niclas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]