Download the PHP package codaxis/cakephp-bootstrap3-helpers without Composer
On this page you can find all versions of the php package codaxis/cakephp-bootstrap3-helpers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codaxis/cakephp-bootstrap3-helpers
More information about codaxis/cakephp-bootstrap3-helpers
Files in codaxis/cakephp-bootstrap3-helpers
Package cakephp-bootstrap3-helpers
Short Description CakePHP highly configurable helpers for Bootstrap 3 framework.
License MIT
Homepage https://github.com/Codaxis/bootstrap3-helpers
Informations about the package cakephp-bootstrap3-helpers
CakePHP Bootstrap 3 FormHelper
Yet another Cake 2.x form helper, but with minimal coding and highly configurable.
Feel free to make any code/docs contributions or post any issues.
Installation
-
Install with composer by running
composer require codaxis/cakephp-bootstrap3-helpers:1.1
or clone/copy files intoapp/Plugin/Bs3Helpers
-
Include the plugin in your bootstrap.php with
CakePlugin::load('Bs3Helpers')
orCakePlugin::load('Bs3Helpers', array('bootstrap' => true))
to load included default Bootstrap form styles. -
Load helper in your . Use classname option if you want to keep your helper alias as Form.
- Define your custom form styles at wish in your bootstrap.php
Form helper usage options
BsFormHelper::create() custom options:
-
=> shortcut for custom form styles. E.g.: will add 'form-inline' class to form tag
- => if set, will enable end() method div option and set passed div class. Useful to be used gloabally or with a defined form style
Bs3FormHelper::input() default base options:
- =>
- =>
- =>
- =>
Bs3FormHelper::input() custom options:
- => html code to prepend right before the input.
- => html code to append right after the input.
- => if set, will wrap the form input inside a div with the css class passed. Useful for input sizing.
- => help text to show after input. Will be rendered inside a div with .help-block class.
- => Error class for .form-group div. Defaults to 'has-error'.
- => if set to true, will render error messages always inside as list, no matter if there's only one error. Useful to ensure ui consistency.
- => allows feedback icons in text inputs, passing or will render the full tag.
- => array options that supports the following params:
- => can be or
- : html code to prepend. If it starts with or , will be interpreted as an icon and the full icon tag will be rendered.
- : html code to prepend. If it starts with or , will be interpreted as an icon and the full icon tag will be rendered.
- => if set, the whole input div (without taking into account .help-block) will be wrapped inside another div with the given class will be applied, preventing unnecessary shrinking in some cases. Solves this issue https://github.com/twbs/bootstrap/issues/9694.
- : if set, will wrap a single checkbox inside a and a with the passed text.
- => used in conjuntion with checkbox and radio groups to allow inline display.
Global form styles
Global form styles can be defined in bootstrap.php and used anywhere by passing the option in create() method.
Inbuilt styles horizontal and inline included are defined like:
Html helper usage options
TODO
License
Licensed under MIT License