> @Brandon:
> Could you possibly include this in the form plugin Mike?

Yes, I think this makes sense.

> @Jörn:
> I think it would be possible to split form's formToArray function: Extract a 
> formValue
> method(or whatever name you like) that is then used by formToArray but also
> available for other code, say... validation stuff.

I think I'd rather leave formToArray as is.  Matt Grimm put a lot of
great work into optimizing it and making it succinct.  Also, from a
form perspective, it needs to build the values inclusive of the
element name - field level value extraction doesn't need that, and in
the simplest case can simply return a single value.

I'd propose something like $().fieldValue() and $().fieldSerialize be
added to the form plugin.  Both could take an optional "successful
only" argument indicating if non-successful controls should be
ignored.  fieldValue() would return the value of the first matched
element, in array form if necessary.  fieldSerialize could build a
query string of all matched elements.

Mike

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to