WebAndCow / CakePHP-BsHelpers

Extension of the CakePHP's FormHelper and HtmlHelper to use the framework Bootstrap v3 more easily
http://webandcow.github.io/CakePHP-BsHelpers/
MIT License
26 stars 15 forks source link

Validation Errors #5

Closed ghost closed 10 years ago

ghost commented 10 years ago

Below is how I format my inputs to display validation errors. How can I use your helper to format like below.

screen shot 2013-12-26 at 4 41 12 pm

WebAndCow commented 10 years ago

We added some changes to add an 'after' option. Please take the latest version.

You can use the BsForm like this :

echo $this->BsForm->input('city', array( 'after' => $this->Form->error('city', array(), array('wrap' => 'span', 'class' => 'help-block')).'

', 'error' => array('attributes' => array('style' => 'display:none')) ));

We're working on an error() function for the BsForm. Keep us posted if your code with this solution works.