Skip to content

Commit

Permalink
Update documentation for input checkbox arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
geerteltink committed Jul 27, 2019
1 parent 8d54aae commit f30e563
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/wiki/API-Form-Elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,16 @@ Resources:
<input type="checkbox" name="checkbox" value="value" />
```

Input arrays are supported. The following will return an array `['cars'=>['audi', 'bmw']]`.

```html
<form action="/" method="post">
<input type="checkbox" name="cars[]" value="audi" checked />
<input type="checkbox" name="cars[]" value="bmw" checked />
<input type="checkbox" name="cars[]" value="volkswagen" />
</form>
```

Resources:
[whatwg](https://html.spec.whatwg.org/multipage/forms.html#checkbox-state-(type=checkbox))

Expand Down

0 comments on commit f30e563

Please sign in to comment.