Bug Tracker

Modify

Ticket #7120 (closed feature: duplicate)

Opened 3 years ago

Last modified 2 years ago

problem with .link() and array type form inputs like <input name="foo[]" />

Reported by: pauly Owned by: BorisMoore
Priority: undecided Milestone:
Component: datalink Version: 1.4.2
Keywords: link data-link Cc:
Blocking: Blocked by:

Description

If you have an input called party[children] with a value of 5 and you use the new jquery .link() to link the form to an object, it creates

{ 'party[children]': 5 }

instead of

{ party: { children: 5 } }

like I would expect...

Change History

comment:1 Changed 3 years ago by BorisMoore

  • Component changed from unfiled to datalink

comment:2 Changed 3 years ago by BorisMoore

  • Owner set to BorisMoore
  • Status changed from new to assigned
  • Type changed from bug to feature

The Data Link plugin does not currently interpret the object structure from the name. That would be a good feature request. Switching this from type bug to type feature, and assigning back to me...

comment:3 Changed 3 years ago by snover

  • Milestone 1.4.3 deleted

Resetting milestone to future.

comment:4 Changed 2 years ago by BorisMoore

  • Status changed from assigned to closed
  • Resolution set to duplicate

This will be in Beta2 of DataLink. Resolving this issue here, and cloning a copy here:  https://github.com/jquery/jquery-datalink/issues/24 since we are using the Issue Tracker for DataLink issues.

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.