Hmm, just saw another message concerning the forms.js versions:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=109595761120738&w=2
Guess I was just a bit too jumpy to mail this
Jan
Jan Hoskens wrote:
Hi,
I'm using forms.js v2 'cause I need the createForm with an element
instead of uri. I just tried to use fd:submit buttons to be able to
skip validation with certain submits.
Nothing's wrong there, but as I previously worked with html submits
(see old way) and used the same name "submit_action" I could check the
value of that request parameter to find out which button was pressed.
Now with the fd:submit buttons, the name, id and values are set
"automatically" so I don't have the same name in multiple buttons. I
noticed however that there's something like "form.submitId" to
retreive the buttonid that was pressed. This is only available (set)
in the forms.js "v1" not in v2 or v3.
Is this normal? Shouldn't both other versions have the same funcionality?
As workaround I now check if a request parameter Cancel is given or
not (as opposed to retreiving the submitId and checking it's value).
Old way:
<input align="center" name="submit_action" type="submit" value="Cancel"/>
<input align="center" name="submit_action" type="submit" value="Ok"/>
Check the request parameter "submit_action" for values "Cancel" or "Ok"
New way: fd:buttons give html:
<input title="" name="Cancel" type="submit" id="Cancel" value="Cancel" />
<input title="" name="Ok" type="submit" id="Ok" value="Ok" />
So for now I'm checking if request parameter "Cancel" exists (!= null)
because form.submitId is always undefined (using v2 , not v1!)
Kind Regards,
Jan
---------------------------------------------------------------------
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]