Permalink
Browse files

Update FormHelper.php

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 abb0c7cb9dd9d0988f8a12960693cfd00857c824
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Cake/View/Helper/FormHelper.php
@@ -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);
}

0 comments on commit abb0c7c

Please sign in to comment.