Bug Tracker

Opened 10 years ago

Closed 9 years ago

#5155 closed feature (invalid)

array input fields

Reported by: naktinis Owned by:
Priority: major Milestone: 1.4
Component: ajax Version: 1.3.2
Keywords: Cc: naktinis@…
Blocked by: Blocking:

Description

Say we have checkbox array: <input type="checkbox" name="check[]" value="a" /> <input type="checkbox" name="check[]" value="b" />

$("input[name='check[]']").val() returns "on"

I think it would be more correct to return an array of on/off states: ["on", "off"] etc.

Change History (2)

comment:1 Changed 9 years ago by dmethvin

Component: unfiledajax
Type: bugfeature

comment:2 Changed 9 years ago by dmethvin

Resolution: invalid
Status: newclosed

This has been discussed in the forum several times. We can't really change that without possible backward compat problems, this is best done with a new method like .vals() guaranteed to return an array.

Note: See TracTickets for help on using tickets.