Skip to content

Conversation

@wvdongen
Copy link
Contributor

@wvdongen wvdongen commented Jan 7, 2014

When creating horizontal forms the input default settings specify the label class. Therefore the 'quick setting' of the label text isn't possible anymore (array merge will fail), for example:

 echo $this->Form->input('birth_dt', array(
    'label' => 'Date of birth',
 ));

So we needed to do the following:

 echo $this->Form->input('birth_dt', array(
    'label' => array(
         'text' => 'Date of birth'
     ),
 ));

This is a little fix so we can set the label again using the 'quick style' without specifying the text key

@slywalker
Copy link
Owner

Sorry, test is failed.
I can not merge (T_T)

@wvdongen
Copy link
Contributor Author

wvdongen commented Jan 8, 2014

The test failed due to CakePHP updates from 2.4.3 to 2.4.4. The test has been fixed.

@impronta48
Copy link

Very good result!

slywalker added a commit that referenced this pull request Jan 9, 2014
Set label text without having to create array 'text' key.
@slywalker slywalker merged commit a555180 into slywalker:master Jan 9, 2014
@slywalker
Copy link
Owner

Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants