Bug Tracker

Modify

Ticket #5155 (closed feature: invalid)

Opened 4 years ago

Last modified 3 years ago

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.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.