Fix FormHelper::input ignoring value option.

This commit is contained in:
Yoshiyuki Kinjo 2015-07-21 23:04:20 +09:00
parent 0e0775559c
commit 5de9b022ea

View file

@ -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'));