PHPackages                             codaxis/cakephp-bootstrap3-helpers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. codaxis/cakephp-bootstrap3-helpers

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

codaxis/cakephp-bootstrap3-helpers
==================================

CakePHP highly configurable helpers for Bootstrap 3 framework.

1.2(10y ago)4111.8k↑107.1%21[1 PRs](https://github.com/ajfranzoia/cakephp-bootstrap3-helpers/pulls)2MITPHPPHP &gt;=5.3.0

Since Apr 30Pushed 10y ago11 watchersCompare

[ Source](https://github.com/ajfranzoia/cakephp-bootstrap3-helpers)[ Packagist](https://packagist.org/packages/codaxis/cakephp-bootstrap3-helpers)[ Docs](https://github.com/Codaxis/bootstrap3-helpers)[ RSS](/packages/codaxis-cakephp-bootstrap3-helpers/feed)WikiDiscussions master Synced today

READMEChangelog (5)DependenciesVersions (10)Used By (2)

CakePHP Bootstrap 3 FormHelper
==============================

[](#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.

[![Build Status](https://camo.githubusercontent.com/9e89a35f5668649c6bd7c50969eb9a56c43ac5ec979d44aca5f165d4bb4f1d7f/68747470733a2f2f7472617669732d63692e6f72672f616a6672616e7a6f69612f63616b657068702d626f6f747374726170332d68656c706572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Codaxis/cakephp-bootstrap3-helpers)

Installation
------------

[](#installation)

1. Install with composer by running `composer require codaxis/cakephp-bootstrap3-helpers:1.1` or clone/copy files into `app/Plugin/Bs3Helpers`
2. Include the plugin in your bootstrap.php with `CakePlugin::load('Bs3Helpers')` or `CakePlugin::load('Bs3Helpers', array('bootstrap' => true))` to load included default Bootstrap form styles.
3. Load helper in your `AppController`. Use classname option if you want to keep your helper alias as Form.

    ```
    // In AppController.php
    public $helpers = array('Bs3Helpers.Bs3Form');
    // or
    public $helpers = array('Form' => array('className' => 'Bs3Helpers.Bs3Form'));
    ```
4. Define your custom form styles at wish in your bootstrap.php

Form helper usage options
-------------------------

[](#form-helper-usage-options)

**BsFormHelper::create() custom options:**

- `formStyle` =&gt; shortcut for custom form styles. E.g.: `formStyle => inline` will add 'form-inline' class to form tag
- `submitDiv` =&gt; 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:**

- `class` =&gt; `'form-control'`
- `div` =&gt; `array('class' => 'form-group')`
- `label` =&gt; `array('class' => 'control-label')`
- `error` =&gt; `array('attributtes' => 'array('class' => 'help-block'))`

**Bs3FormHelper::input() custom options:**

- `beforeInput` =&gt; html code to prepend right before the input.
- `afterInput` =&gt; html code to append right after the input.
- `wrap` =&gt; if set, will wrap the form input inside a div with the css class passed. Useful for input sizing.
- `help` =&gt; help text to show after input. Will be rendered inside a div with .help-block class.
- `errorClass` =&gt; Error class for .form-group div. Defaults to 'has-error'.
- `errorsAlwaysAsList` =&gt; 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.
- `feedback` =&gt; allows feedback icons in text inputs, passing `fa-icon-name` or `glyphicon-icon-name` will render the full `` tag.
- `inputGroup` =&gt; array options that supports the following params:
    - `size` =&gt; can be `sm` or `lg`
    - `prepend`: html code to prepend. If it starts with `fa` or `glyphicon`, will be interpreted as an icon and the full icon tag will be rendered.
    - `append`: html code to prepend. If it starts with `fa` or `glyphicon`, will be interpreted as an icon and the full icon tag will be rendered.
- `externalWrap` =&gt; 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 [twbs/bootstrap#9694](https://github.com/twbs/bootstrap/issues/9694).
- `checkboxLabel`: if set, will wrap a single checkbox inside a `div.checkbox` and a `label` with the passed text.
- `inline` =&gt; used in conjuntion with checkbox and radio groups to allow inline display.

Global form styles
------------------

[](#global-form-styles)

Global form styles can be defined in bootstrap.php and used anywhere by passing the `formStyle` option in create() method.

Inbuilt styles horizontal and inline included are defined like:

```
Configure::write('Bs3.Form.styles', array(
	'horizontal' => array(
		'formDefaults' => array(
			'submitDiv' => 'col-sm-10 col-sm-offset-2'
		),
		'inputDefaults' => array(
			'label' => array(
				'class' => 'col-sm-2 control-label'
			),
			'wrap' => 'col-sm-10',
		)
	),
	'inline' => array(
		'inputDefaults' => array(
			'label' => array(
				'class' => 'sr-only'
			),
		)
	)
));
```

Html helper usage options
-------------------------

[](#html-helper-usage-options)

TODO

License
-------

[](#license)

Licensed under [MIT License](http://www.opensource.org/licenses/mit-license.php)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~152 days

Total

5

Last Release

3838d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6729928?v=4)[Codaxis Web Development](/maintainers/codaxis)[@Codaxis](https://github.com/Codaxis)

---

Top Contributors

[![ajfranzoia](https://avatars.githubusercontent.com/u/964115?v=4)](https://github.com/ajfranzoia "ajfranzoia (63 commits)")[![Codaxis](https://avatars.githubusercontent.com/u/6729928?v=4)](https://github.com/Codaxis "Codaxis (9 commits)")[![klarkc](https://avatars.githubusercontent.com/u/724959?v=4)](https://github.com/klarkc "klarkc (4 commits)")[![horgen](https://avatars.githubusercontent.com/u/1182798?v=4)](https://github.com/horgen "horgen (2 commits)")[![SWW13](https://avatars.githubusercontent.com/u/1280142?v=4)](https://github.com/SWW13 "SWW13 (2 commits)")[![thegallagher](https://avatars.githubusercontent.com/u/486626?v=4)](https://github.com/thegallagher "thegallagher (1 commits)")

---

Tags

helpercakephpbootstrap

### Embed Badge

![Health badge](/badges/codaxis-cakephp-bootstrap3-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/codaxis-cakephp-bootstrap3-helpers/health.svg)](https://phpackages.com/packages/codaxis-cakephp-bootstrap3-helpers)
```

###  Alternatives

[laravelista/ekko

Framework agnostic PHP package for marking navigation items active.

274700.4k4](/packages/laravelista-ekko)[kartik-v/yii2-helpers

A collection of useful helper functions for Yii Framework 2.0

933.1M29](/packages/kartik-v-yii2-helpers)[holt59/cakephp3-bootstrap-helpers

Bootstrap Helpers for CakePHP 3.0

125241.8k](/packages/holt59-cakephp3-bootstrap-helpers)[drmonkeyninja/cakephp-social-share

CakePHP helper for creating social share/bookmark links

34103.6k](/packages/drmonkeyninja-cakephp-social-share)[dereuromark/cakephp-url-cache

CakePHP plugin to speed up URL reverse lookup

25117.2k](/packages/dereuromark-cakephp-url-cache)[dereuromark/cakephp-calendar

A CakePHP plugin to easily create calendars.

16112.0k1](/packages/dereuromark-cakephp-calendar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
