Skip to content

Commit a3abe59

Browse files
committed
Set label text without having to create array 'text' key.
1 parent 06d63a3 commit a3abe59

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

View/Helper/BoostCakeFormHelper.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ public function input($fieldName, $options = array()) {
7676
'afterInput' => '',
7777
'errorClass' => 'has-error error'
7878
);
79+
80+
if (isset($options['label']) && is_string($options['label'])) {
81+
$options['label'] = array(
82+
'text' => $options['label']
83+
);
84+
}
7985

8086
$options = Hash::merge(
8187
$default,

0 commit comments

Comments
 (0)