Is it possible to have the Forms plugin $.formToArray include the
clicked submit element (name/value pair) -- as the W3C standard does.
Currently it seems to be ignored, even when semantic is passed as true.
I have existing scripts which have (previously) assigned significance to
which submit button was pressed. E.g.
When calling $.formToArray() on -->
<form method="post" action="">
<textarea name="exampleB" rows="5"
cols="44">{$activate_msg|escape}</textarea>
<input type="text" name="exampleA" />
<input type="submit" name="normal" value="{t}Update{/t}" />
<input type="submit" name="restore[activate]" value="{t}Restore to
Defaults{/t}" />
</form>
An object is returned resembling;
{exampleB: value, exampleA: value}
Where I would expect;
{exampleB: value, exampleA: value, normal: 'Update'} (if the "update"
button were pressed) OR
{exampleB: value, exampleA: value, 'restore[active]': 'Restore to
Defaults' } (if the "restore button" were pressed)
Make sense?
~ Brice
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/