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
This commit is contained in:
ptica 2014-10-24 18:25:31 +02:00
parent 1a799b07b3
commit abb0c7cb9d

View file

@ -2069,7 +2069,8 @@ class FormHelper extends AppHelper {
'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);
}