Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Form Input Names should support hashmaps and arrays #690

Closed
ProLoser opened this issue Dec 15, 2011 · 4 comments
Closed

Form Input Names should support hashmaps and arrays #690

ProLoser opened this issue Dec 15, 2011 · 4 comments

Comments

@ProLoser
Copy link
Contributor

I would like to be able to do either of these two solutions:
<input type="checkbox" name="items[id]">
<input type="checkbox" name="items.id{{id}}">

Why?

So that I can refer to 1 variable in the scope and treat it as an array of checkbox values. You can have all the keys set to the value specified by the checkbox (or just 1 by default). This seems a lot more reasonable than having to deal with functions that manually handle the data when you check or uncheck.

@mhevery
Copy link
Contributor

mhevery commented Dec 15, 2011

this form should work and is supported:

<input type="checkbox" name="items[id]">

Does it not work for you? What version are you using? Could you produce jsfiddle?

@mhevery mhevery closed this as completed Dec 15, 2011
@ProLoser
Copy link
Contributor Author

@ProLoser
Copy link
Contributor Author

Could you provide an example of how i could properly do this? I've tried this with 0.10.5 too to no avail.

@mhevery
Copy link
Contributor

mhevery commented Dec 16, 2011

working example: http://jsfiddle.net/qGVGh/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants