Skip to content

Commit

Permalink
Move unset() of hiddenField to FormHelper
Browse files Browse the repository at this point in the history
FormHelper handles this option there is no need for it to be passed into
the widget.
  • Loading branch information
markstory committed Feb 11, 2017
1 parent 05e396d commit 441e44b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/View/Helper/FormHelper.php
Expand Up @@ -2002,6 +2002,7 @@ public function multiCheckbox($fieldName, $options, array $attributes = [])
];
$hidden = $this->hidden($fieldName, $hiddenAttributes);
}
unset($attributes['hiddenField']);

return $hidden . $this->widget('multicheckbox', $attributes);
}
Expand Down
2 changes: 1 addition & 1 deletion src/View/Widget/MultiCheckboxWidget.php
Expand Up @@ -186,7 +186,7 @@ protected function _renderInput($checkbox, $context)
'templateVars' => $checkbox['templateVars'],
'attrs' => $this->_templates->formatAttributes(
$checkbox,
['name', 'value', 'text', 'options', 'label', 'val', 'type', 'hiddenField']
['name', 'value', 'text', 'options', 'label', 'val', 'type']
)
]);

Expand Down

0 comments on commit 441e44b

Please sign in to comment.