Skip to content

Commit

Permalink
Move hiddenField handling to FormHelper
Browse files Browse the repository at this point in the history
The input creation should unset the property.

Refs #10138
  • Loading branch information
markstory committed Feb 13, 2017
1 parent a6872f8 commit b0a3fe8
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 @@ -2018,6 +2018,7 @@ public function multiCheckbox($fieldName, $options, array $attributes = [])
]; ];
$hidden = $this->hidden($fieldName, $hiddenAttributes); $hidden = $this->hidden($fieldName, $hiddenAttributes);
} }
unset($attributes['hiddenField']);


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


Expand Down

0 comments on commit b0a3fe8

Please sign in to comment.