PHPackages                             alexwenzel/bselements - 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. alexwenzel/bselements

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alexwenzel/bselements
=====================

Bootstrap shortcuts and elements for Laravel

v1.2.0(11y ago)0151GPL-2PHPPHP &gt;=5.4.0

Since Mar 28Pushed 11y agoCompare

[ Source](https://github.com/alexwenzel/bselements)[ Packagist](https://packagist.org/packages/alexwenzel/bselements)[ RSS](/packages/alexwenzel-bselements/feed)WikiDiscussions development Synced today

READMEChangelogDependencies (1)Versions (6)Used By (0)

Laravel form elements for quick prototyping
===========================================

[](#laravel-form-elements-for-quick-prototyping)

This package provides form elements for **Laravel 4.2**, which are styled with [Bootstrap 3](http://getbootstrap.com/css/#forms).

- shows first error message in help text area
- labels the input with the error class
- automatically repopulates the form elements

There is a demo page included in this package: use `View::make('bselements::demopage')`.

Example
-------

[](#example)

```
{{ BsForm::useViewErrorBag($errors) }}
{{ BsForm::info('Info', 'Infotext', array()) }}
{{ BsForm::text('text', 'Text') }}
{{ BsForm::textAddon('left', 'Demo', 'textaddon1', 'Text-Addon') }}
{{ BsForm::textAddon('right', 'Demo', 'textaddon2', 'Text-Addon') }}
{{ BsForm::password('password', 'Password') }}
{{ BsForm::file('file', 'File') }}
{{ BsForm::select('select', 'Select', array(''=>'-- Choose --','s1'=>'Select 1','s2'=>'Select 2','s3'=>'Select 3')) }}
{{ BsForm::textarea('textarea', 'Textarea') }}
{{ BsForm::radioGroup('radiogroup', 'radioGroup', array('r1'=>'1','r2'=>'2','r3'=>'3')) }}
{{ BsForm::checkboxGroup('checkboxGroup', array('c1'=>'one','c2'=>'two','c3'=>'three')) }}
```

[![checkbox](img/screen1.png)](img/screen1.png)

[![checkbox](img/screen2.png)](img/screen2.png)

Usage
-----

[](#usage)

First register the service provider `Alexwenzel\Bselements\BselementsServiceProvider` in `app/conf/app.php`.

Then you can use it with the following syntax:

```
{{ BsForm::text('text', 'Text') }}
````

Bootstrap assets (CSS/JS) are not included! Include them yourself.

## Form elements

### Injecting validation messages

You can inject your validation messages within you template into the BsForm class.

````php
BsForm::useViewErrorBag($errors)
````

### Info

Generates a text input look-alike field, without any functionality.

````php
BsForm::info($label, $text, array $attributes = array())
````

### Text

Generates a text input element.

````php
BsForm::text($id, $label, array $attributes = array())
````

### Text Addon

Generates a text input element with addon.

````php
BsForm::textAddon($addonDirection, $addonContent, $id, $label, array $attributes = array())
````

  * ``$addonDirection`` can be ``left`` or ``right``
  * ``$addonContent`` can be any HTML/String

### File

Generates a file input element.

````php
BsForm::file($id, $label, array $attributes = array())
````

### Select

Generates a select element.

````php
BsForm::select($id, $label, array $elements, array $attributes = array())
````

### Password

Generates a password input element.

````php
BsForm::password($id, $label, array $attributes = array())
````

### Textarea

Generates a textarea element.

````php
BsForm::textarea($id, $label, array $attributes = array())
````

### Radio Group

Generates a group of radio elements.

````php
BsForm::radioGroup($id, $label, array $values)
````

### Checkbox Group

Generates a group of checkbox elements.

````php
BsForm::checkboxGroup($label, array $values)
````
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity62

Established project with proven stability

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 ~27 days

Total

4

Last Release

4342d ago

Major Versions

v0.1 → v1.0.02014-04-14

PHP version history (2 changes)v0.1PHP &gt;=5.3.0

v1.1.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/daa810c2b94be273599a10ebeeb8b1a55ef77b570fb92209730650fad1339788?d=identicon)[alexwenzel](/maintainers/alexwenzel)

---

Tags

laravelbootstrap

### Embed Badge

![Health badge](/badges/alexwenzel-bselements/health.svg)

```
[![Health](https://phpackages.com/badges/alexwenzel-bselements/health.svg)](https://phpackages.com/packages/alexwenzel-bselements)
```

###  Alternatives

[anahkiasen/former

A powerful form builder

1.4k1.4M14](/packages/anahkiasen-former)[patricktalmadge/bootstrapper

Twitter Bootstrap markup generator

557407.2k4](/packages/patricktalmadge-bootstrapper)[leantony/laravel-grid

A grid view for laravel, inspired by the yii2 grid widget

9060.2k](/packages/leantony-laravel-grid)[bgaze/bootstrap-form

Bootstrap 4 forms builder for Laravel 5.8+

5243.5k](/packages/bgaze-bootstrap-form)[inkvizytor/fluentform

Form builder for Laravel

3416.2k](/packages/inkvizytor-fluentform)[rinvex/laravel-menus

Rinvex Menus is a simple menu builder package for Laravel, that supports hierarchical structure, ordering, and styling with full flexibility using presenters for easy styling and custom structure of menu rendering.

294.0k20](/packages/rinvex-laravel-menus)

PHPackages © 2026

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