From 00919c5f01cfcc4ef1338c33101080b834a140c2 Mon Sep 17 00:00:00 2001 From: Yoshiyuki Kinjo Date: Tue, 21 Jul 2015 23:04:20 +0900 Subject: [PATCH] Fix FormHelper::input ignoring value option. Signed-off-by: mark_story Backport fixes from #7082 to 2.7 --- lib/Cake/View/Helper/FormHelper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 1edbe7551..13247ae78 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -1086,13 +1086,13 @@ class FormHelper extends AppHelper { unset($options['options']); return $this->select($fieldName, $list, $options); case 'time': - $options['value'] = $selected; + $options += array('value' => $selected); return $this->dateTime($fieldName, null, $timeFormat, $options); case 'date': - $options['value'] = $selected; + $options += array('value' => $selected); return $this->dateTime($fieldName, $dateFormat, null, $options); case 'datetime': - $options['value'] = $selected; + $options += array('value' => $selected); return $this->dateTime($fieldName, $dateFormat, $timeFormat, $options); case 'textarea': return $this->textarea($fieldName, $options + array('cols' => '30', 'rows' => '6'));