Skip to content

Commit

Permalink
Update FormHelper.php
Browse files Browse the repository at this point in the history
disabled multiple checkbox input should not generate an enabled hidden input,
as it leads to saving empty data upon submission -> carrying the disabled attribute to the hidden input prevents this
  • Loading branch information
ptica committed Oct 24, 2014
1 parent 1a799b0 commit abb0c7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Cake/View/Helper/FormHelper.php
Expand Up @@ -2069,7 +2069,8 @@ public function select($fieldName, $options = array(), $attributes = array()) {
'id' => $attributes['id'] . ($style ? '' : '_'),
'secure' => false,
'form' => isset($attributes['form']) ? $attributes['form'] : null,
'name' => $attributes['name']
'name' => $attributes['name'],
'disabled' => $attributes['disabled']
);
$select[] = $this->hidden(null, $hiddenAttributes);
}
Expand Down

0 comments on commit abb0c7c

Please sign in to comment.