CakePHP\'s FormHelper is how you generate forms when making CakePHP applications. As one might assume, this includes generating input elements, like so:
$thi
Inspired by lericson's answer, this is my final solution for CakePHP 2.x:
Form->create('ModelName', array(
'class' => 'form-horizontal',
'inputDefaults' => array(
'format' => array('before', 'label', 'between', 'input', 'error', 'after'),
'div' => array('class' => 'control-group'),
'label' => array('class' => 'control-label'),
'between' => '',
'after' => '',
'error' => array('attributes' => array('wrap' => 'span', 'class' => 'help-inline')),
)));?>
Form->end();?>
Which produces:
I basically added the 'format' and 'error' keys, and added the control-label class to the label element.