bitovi / bitovi/jquerypp

$.formParams() should not convert arrays into single-value-attributes

Open
#96 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
155
PR merge metrics
No merged PRs in 30d

Description

Hi,

It seems that formparams omits array-types even though the input name specifically represents an array:

Given the following html:

``` html

```

The following happens currently:

``` javascript
$("#test-form").formParams()
-> { foo: "bar" }
```

But what should happen is:

``` javascript
$("#test-form").formParams()
-> { foo: ["bar"] }
```

see codepen @ http://codepen.io/tunylund/pen/IqCLF

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the $.formParams() entry point and trace how input names ending in [] are converted into the returned object. Reproduce the HTML example from the issue, then verify that the result preserves foo as an array containing "bar" rather than a single value.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.