CakePHP creates a div that automatically wraps any of its input tags that are created using formhelper as follows:
$this->formhelper->input('something');
Thus, the output is as follows:
<div class='input'>
<input />
</div>
I know there is a way to add classes to the input tag ie
$this->formhelper->input('text', array('class' => 'some_css'));
But how would you add style to the div that CakePHP automatically creates. It may be something where the kernel needs to be hacked, but I want to know if there is a better way to do this so that I get something as follows:
<div class='input other_class_I_want_here'>
<input />
</div>
Thanks to everyone who can help.
source
share