PHPackages                             a2design-inc/laravel-form-builder - 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. a2design-inc/laravel-form-builder

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

a2design-inc/laravel-form-builder
=================================

Form Builder for the Laravel Framework

v0.2.2(8y ago)102.4k3MITPHPPHP &gt;=5.6.4

Since Sep 4Pushed 6y ago7 watchersCompare

[ Source](https://github.com/a2design-inc/laravel-form-builder)[ Packagist](https://packagist.org/packages/a2design-inc/laravel-form-builder)[ RSS](/packages/a2design-inc-laravel-form-builder/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Laravel Form Builder
====================

[](#laravel-form-builder)

Laravel plugin for quick form creation with Bootstrap support.

You can display validation errors, old input values and form context based on model entity without any line of code and with great flexibility.

[![example_image](https://user-images.githubusercontent.com/5417461/66260886-54a36700-e7e6-11e9-896d-58e02c55281d.png)](https://user-images.githubusercontent.com/5417461/66260886-54a36700-e7e6-11e9-896d-58e02c55281d.png)

Table of Contents
-----------------

[](#table-of-contents)

- [Quick example](#quick-example)
- [How to install](#how-to-install)
- [Customization](#customization)
    - [Parameters](#parameters)
    - [Template editing](#template-editing)
    - [Configs](#configs)
    - [Disable Bootstrap/Grid](#disable-bootstrapgrid)
- [Examples](#examples)
- [Full list of parameters](#full-list-of-parameters)
- [Full list of configs](#full-list-of-configs)
- [List of methods](#list-of-methods)
- [Tests](#tests)

Quick example
-------------

[](#quick-example)

Your code:

```
{!! Form::create('ArticleController@update', $article) !!}
    {!! Form::input('name', 'Name') !!}
    {!! Form::buttonGroup() !!}
        {!! Form::buttonLink('Cancel', '/') !!}
        {!! Form::reset() !!}
        {!! Form::submit() !!}
    {!! Form::buttonGroupEnd() !!}
{!! Form::end() !!}

```

Output:

```

            Name

                Cancel

                Reset

                Submit

```

Of course, you can disable bootstrap, set global configs, edit templates etc! See below.

How to install
--------------

[](#how-to-install)

Install the package:

```
composer require a2design-inc/laravel-form-builder
```

Register the provider (config/app.php):

```
A2design\Form\FormServiceProvider::class,
```

And the alias:

```
'Form' => A2design\Form\FormFacade::class,
```

Publish the package assets (if you need to change the config file or templates):

```
php artisan vendor:publish
```

Customization
-------------

[](#customization)

[![example_image](https://user-images.githubusercontent.com/5417461/66260887-5c630b80-e7e6-11e9-80c0-2c79a83f24fd.png)](https://user-images.githubusercontent.com/5417461/66260887-5c630b80-e7e6-11e9-80c0-2c79a83f24fd.png)

### Parameters

[](#parameters)

You can specify a lot of additional parameters for every element:

```
{!! Form::create('', null, [

    //set custom method url
    'url' => 'http://google.com',

    //your class
    'class' => 'my-form',

    //etc

]) !!}

```

See the [full list of parameters](#full-list-of-parameters)

### Template editing

[](#template-editing)

The package is used the laravel blade templates for all form elements. Feel free to customize what you need.

Don't forget to publish the package assets for this:

```
php artisan vendor:publish
```

### Configs

[](#configs)

Edit the config/form.php file to change the global settings. Don't forget to publish the package assets for this:

```
php artisan vendor:publish
```

See the [full list of configs](#full-list-of-configs)

### Disable Bootstrap/Grid

[](#disable-bootstrapgrid)

You can remove some class or wrapper for a single element via the $parameters or globally in the config file. You also can redefine grid columns.

Or you can use shortcuts which disable few parameters simultaneously

```
     //remove all bootsrap classes
     'bootstrap' => false,
     //or just show without grid
     'use-grid' => false,
```

Examples
--------

[](#examples)

### Bootstrap

[](#bootstrap)

```

                    Form

                        {!! Form::create('ArticleController@update', $article) !!}
                            {!! Form::input('name', 'Name') !!}
                            {!! Form::buttonGroup() !!}
                                {!! Form::buttonLink('Cancel', '/') !!}
                                {!! Form::submit() !!}
                            {!! Form::buttonGroupEnd() !!}
                        {!! Form::end() !!}

```

### Checkbox with label in different column instead next to

[](#checkbox-with-label-in-different-column-instead-next-to)

```
    {!! Form::checkbox('field', 'Field', ['label' => true]) !!}

```

### Line of checkboxes

[](#line-of-checkboxes)

```
    {!! Form::inputGroup(['checkbox-label-class' => 'checkbox-inline']) !!}
        {!! Form::checkbox('foo', 'Foo') !!}
        {!! Form::checkbox('bar', 'Bar') !!}
    {!! Form::inputGroupEnd() !!}

```

### Line of checkboxes with overall label in separated column

[](#line-of-checkboxes-with-overall-label-in-separated-column)

```
    {!! Form::inputGroup([
        'checkbox-label-class' => 'checkbox-inline',
        'label-text' => 'test',
    ]) !!}
        {!! Form::checkbox('foo', 'Foo') !!}
        {!! Form::checkbox('bar', 'Bar') !!}
    {!! Form::inputGroupEnd() !!}

```

### Line of buttons

[](#line-of-buttons)

```
    {!! Form::buttonGroup(['label-text' => 'Some label']) !!}
        {!! Form::buttonLink('Cancel', '/') !!}
        {!! Form::reset() !!}
        {!! Form::submit() !!}
    {!! Form::buttonGroupEnd() !!}

```

### Required input asterisk

[](#required-input-asterisk)

```
    .form-group.required .control-label:after {
        content: "*";
        color: red;
    }
```

### Post link

[](#post-link)

```
    {!! Form::postLink('ArticleController@destroy', 'Delete', $article) !!}

```

### Radio

[](#radio)

```
    {!! Form::radio('field', 'Select the value', [
        'inline' => true,
        'options' => [
            '1' => 'First',
            '2' => 'Second',
        ]
    ]) !!}

```

Full list of parameters
-----------------------

[](#full-list-of-parameters)

ElementParameterDescriptionEverywhereclassClass attributeidId attribute. Generated automatically. If you don't need, specify an empty string or redefine by id what you want. Or just adjust globally in config fileuse-gridSet false to disable the grid classesbootstrapSet false to disable the bootstrap usingForm::createNote: you can use other parameters here to apply them to all inputs, buttons etc inside the formmethodPOST, GET, PUT etcabsoluteAbsolute path of the methodurlUse the url instead action argumentform-direction-classUse some class for label-&gt;input directionattrsArray of any attributes: attribute-name =&gt; valueenctypeSet the enctype attributehas-filesSet the enctype attribute to "multipart/form-data"fileShortcut for "has-files"Form::inputall-errorsList all of the validation errors fot the input instead only firsterrorSet text of error or false to force hideattrsArray of any attributes: attribute-name =&gt; valuerequiredSet true for the attribute usingreadonlySet true for the attribute usingdisabledSet true for the attribute usingautofocusSet true for the attribute usingtypeSet the type attributewrapper-classSet the class of the input wrapper divform-group-wrapper-classSet the class of the form-group wrapper divlabel-classSet the class of the labellabel-escapedSet false to turn off the string escapingvalueDefine your own valuewrapperSet false if you don't need the wrapper divform-group-wrapperSet false if you don't need the wrapper divlabelSet false if you don't need the label or set some string with HTMLlabel-afterSome string instead default ":"control-label-classRedefine the default bootstrap class for each label ("control-label") or disable itform-group-classSpecify any class instead the "form-group" or set falseform-control-classSpecify any class for the input instead the "form-control" or set falselabel-grid-classSpecify any class for the label grid column or set false to use without gridinput-grid-classSpecify any class for the input grid column or set false to use without gridoffset-input-grid-classOffset for inputs without label columnerror-form-group-classSpecify any class for the form group with error or set falseerror-classSpecify any class for the input with error or set falseonly-inputSet true to disable any wrappersinput-groupAdd string with bootstrap input group or any HTML what you want to add before the inputForm::buttontypeSet the type attributenameSet the name attributevalueSet the value attributeformSet the form attributeautofocusSet true for the attribute usingdisabledSet true for the attribute usingescapedSet true/false for the button text escapingform-group-wrapperSet false if you don't need the wrapper divform-group-wrapper-classSet the class of the form-group wrapper divwrapper-classSet the class of the input wrapper divbtn-classSpecify any class for the input instead the default "btn" or set falselabelSet false (default) if you don't need the label or set some string with HTMLlabel-textSet some text for the labelForm::inputGroupThe group is the several inputs inside one inputs wrappers. So, you can use any input parameters here to describe the label, wrappers etclabel-textLabel text for the groupForm::buttonGroupThe group is the several buttons inside one button wrappers. So, you can use any button parameters here to describe the label, wrappers etcForm::buttonLinkSimilar to the button, but with "href" ant "target"Form::hiddenSimilar to the input, but with hardcoded "only-input" ant "type"Form::checkboxSimilar to the input, but with additional parameterscheckedTrue/falsecheckbox-labelThe check box also have wrapping label, set false to disablecheckbox-label-classDefine class for the label around the checkboxlabelSet true to use label position like as usual input labelForm::selectSimilar to the input, but with additional parametersemptyAllow empty option. True/false or text for empty optionoptionsArray value =&gt; displayed textmultipleTrue/falsesizeSet the size attributevalueYou can set array of selected values instead only one 'value' attribute for the multipleuse-oldTrue/false. By default it is true and the old values is more important that your 'value' parameter.Form::textareaThe save as input but with additional parametersmaxlengthSet the maxlength attributeplaceholderSet the placeholder attributecolsSet the cols attributerowsSet the rows attributeForm::postLinkLink for post datamessageConfirmation messageenctypeSet the enctype attribute manuallymethodPOST, GET, PUT etcabsoluteAbsolute path of the methodurlUse the url instead action argumentescapedSet true/false for the text escapingForm::radioSimilar to the input, but with additional parametersoptionsArray value =&gt; displayed textinlineShow the radio buttons in lineradio-label-classSet class for each radio button labelescapedSet true/false for the text escapingradio-labelThe each radio button has own label, set false to disableFull list of configs
--------------------

[](#full-list-of-configs)

ConfigValuesDefaultMeaningDescriptiongenerate\_idtrue, falsetrueGenerate ids for elementsWhen enabled the ids for inputs, labels, wrappers etc are generated based on entity name, field name and controller methodcontrol\_label\_classfalse, 'string''control-label'Class for each labelRedefine the default bootstrap "control-label" class or disable itlabel\_grid\_classfalse, 'string''col-md-4'Class for grid column with labelSome class name for the gridinput\_grid\_classfalse, 'string''col-md-6'Class for grid column with inputSome class name for the gridroute\_name\_space'string''App\\Http\\Controllers'The namespace of controllersDefined at RouteServiceProvidercontroller\_naming'string''Controller'The name of controllersEnd of your controllers' names By default is just "Controller" when you use ArticleController, UserController etcform\_group\_classfalse, 'string''form-group'Class for form groupRedefine the default bootstrap "form-group" class or disable itform\_control\_classfalse, 'string''form-control'Class for for inputRedefine the default bootstrap "form-control" class or disable iterror\_form\_group\_classfalse, 'string''has-error'Class for form group with errorRedefine the default bootstrap "has-error" class or disable iterror\_classfalse, 'string''has-error'Class for input with errorDefine the class or disable itbtn\_classfalse, 'string''btn btn-primary'Class for for buttonRedefine the default bootstrap "btn" class or disable itoffset\_input\_grid\_classfalse, 'string''col-md-6 col-md-offset-4'Class for grid offsetOffset for inputs without label columnform\_direction\_classfalse, 'string''form-horizontal'Class for form directionRedefine the default bootstrap "form-horizontal" class or disable ituse\_gridtrue, falsetrueUse grid classedWhen enabled the labels and inputs is located in different columnsbootstraptrue, falsetrueUse bootstrap classesWhen enabled the elements have bootstrap classes. You can redefine all of theme separately if you need. This is shortcut for disabling.wrappertrue, falsetrueUse bootstrap classedUse wrap div for input or notform\_group\_wrappertrue, falsetrueUse form group wrapperUse wrap div for label and input or notlabel\_afterfalse, 'string'':'Additional text after label. For example ":"List of methods
---------------

[](#list-of-methods)

#### Elements

[](#elements)

- Form::create($action = '', $entity = null, $parameters = \[\])
- Form::end()
- Form::input($name, $label = '', $parameters = \[\])
- Form::hidden($name, $parameters = \[\])
- Form::buttonGroup($parameters = \[\])
- Form::buttonGroupEnd()
- Form::inputGroup($parameters = \[\])
- Form::inputGroupEnd()
- Form::button($text = 'Submit', $parameters = \[\])
- Form::buttonLink($text = 'Cancel', $link = '/', $parameters = \[\])
- Form::checkbox($name, $label = '', $parameters = \[\])
- Form::postLink($action = '', $text = '', $entity = null, $parameters = \[\])
- Form::radio($name, $label = '', $parameters = \[\])
- Form::textarea($name, $label = '', $parameters = \[\])
- Form::select($name, $label = '', $parameters = \[\])

#### Shortcuts

[](#shortcuts)

Equal to input() with the "type" parameter

- Form::text() - input() alias
- Form::password()
- Form::color()
- Form::date()
- Form::datetime()
- Form::datetimeLocal()
- Form::email()
- Form::number()
- Form::range()
- Form::search()
- Form::tel()
- Form::time()
- Form::url()
- Form::month()
- Form::week()
- Form::file()

Other:

- Form::reset() - Form::button() with type reset
- Form::submit() - Form::button() alias
- Form::text() - Form::textarea() alias

Tests
-----

[](#tests)

If you are contributor don't forget run/write tests for any updates!

[![example_image](https://camo.githubusercontent.com/4ede6966d6dd9d13fdd42cce4dbddf4a7f7984399d920d854ef9884dda5bceff/68747470733a2f2f692e696d6775722e636f6d2f58774252304f352e706e67)](https://camo.githubusercontent.com/4ede6966d6dd9d13fdd42cce4dbddf4a7f7984399d920d854ef9884dda5bceff/68747470733a2f2f692e696d6775722e636f6d2f58774252304f352e706e67)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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 ~3 days

Total

4

Last Release

3164d ago

### Community

Maintainers

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

---

Top Contributors

[![MrMYSTIC](https://avatars.githubusercontent.com/u/1566816?v=4)](https://github.com/MrMYSTIC "MrMYSTIC (2 commits)")[![loburets](https://avatars.githubusercontent.com/u/5417461?v=4)](https://github.com/loburets "loburets (1 commits)")

### Embed Badge

![Health badge](/badges/a2design-inc-laravel-form-builder/health.svg)

```
[![Health](https://phpackages.com/badges/a2design-inc-laravel-form-builder/health.svg)](https://phpackages.com/packages/a2design-inc-laravel-form-builder)
```

###  Alternatives

[nahid/linkify

Converts URLs and email addresses in text into HTML links its extended from Misd\\Linify its also support laravel 5

11136.0k1](/packages/nahid-linkify)[ipe/smsir-php

A package for sending SMS.

1113.3k1](/packages/ipe-smsir-php)

PHPackages © 2026

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