Modify ↓
Ticket #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@… | |
| Blocking: | Blocked by: |
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
comment:1 Changed 3 years ago by dmethvin
- Type changed from bug to feature
- Component changed from unfiled to ajax
comment:2 Changed 3 years ago by dmethvin
- Status changed from new to closed
- Resolution set to invalid
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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.
