From 5d31eae3a31c565171a555f49aed2a891d5113bb Mon Sep 17 00:00:00 2001 From: Angel Ivanov Date: Wed, 11 Feb 2015 22:50:29 +0200 Subject: [PATCH] Update ElementsBehaviour.php A fix for the MultiCheckbox element that will set the elements name as an array. --- src/Form/Behaviour/ElementsBehaviour.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Form/Behaviour/ElementsBehaviour.php b/src/Form/Behaviour/ElementsBehaviour.php index 98c1026..393e5d9 100644 --- a/src/Form/Behaviour/ElementsBehaviour.php +++ b/src/Form/Behaviour/ElementsBehaviour.php @@ -512,7 +512,7 @@ public function addMultiCheckbox( array $attributes = [] ) { - $element = new Form\Element\MultiCheckbox($name, $options, $attributes); + $element = new Form\Element\MultiCheckbox($name . '[]', $options, $attributes); if (!$label) { $label = ucfirst($name); @@ -596,4 +596,4 @@ public function addMultiSelect( $name = $name . '[]'; return $this->addSelect($name, $label, $description, $elementOptions, $value, $options, $attributes); } -} \ No newline at end of file +}