From abb0c7cb9dd9d0988f8a12960693cfd00857c824 Mon Sep 17 00:00:00 2001 From: ptica
Date: Fri, 24 Oct 2014 18:25:31 +0200 Subject: [PATCH] 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 --- lib/Cake/View/Helper/FormHelper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 815516ba9..66ea22deb 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -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); }