adamwathan / form

Super basic form HTML builder, only really exists so I can pull it in for some other more useful projects.
MIT License
232 stars 118 forks source link

Prefill checkbox and radio inputs #27

Closed jonasemde closed 9 years ago

adamwathan commented 9 years ago

Can you describe what this change is doing? It's broken some tests and I'm not sure what problem you are trying to solve.

jonasemde commented 9 years ago

Hi Adam, the tests are passing when a plain value is stored in the "setOldInputProvider" Instance. But checkboxes, radiobuttons and select/option fields could return arrays as well.

For example: <input type="checkbox" name="check[]" value="test1"> ... and ... <input type="checkbox" name="check[]" value="test2">

... submits the following $_REQUEST: ["check"]=> array(2) { [0]=> string(5) "test2" [1]=> string(5) "test2" }

adamwathan commented 9 years ago

Hey @jonasemde, trying to get some PRs and issues cleaned up, going to close this for now but if you'd like to revisit and get the rest of the tests passing, I'm happy to reopen it and talk about it again.