How do you build up checkboxes as arrays
Created 7 years ago by williamExample
If i build a form like so:
{% set form = form ({
'handler': 'MyHandler@handle',
'ajax': true,
'options': {
'redirect': false,
},
'fields': {
}
}).get() %}
What do i specify within fields to have the following output?
Expected Output
<input type="checkbox" name="checkboxarray[]" value="value1">
<input type="checkbox" name="checkboxarray[]" value="value2">
This is how you do it: