Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $form->add(
- 'Multiple Checkboxes',
- 'multicheck',
- FORM_INPUT_TYPE_CHECKBOX,
- false);
- $form->setValueType(FORM_VALUE_TYPE_ARRAY);
- $form->addValue(
- 1, 'First');
- $form->addValue(
- 2, 'Second');
- $form->addValue(
- 3, 'Third');
- $form->addValue(
- 4, 'Forth');
- // and once form has been submitted you can check by
- $checkedvalues = $form->get('multicheck');
- // var_dump($checkedvalues); should give you an array of the checked items
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement