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

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

djigir/laravel-form-builder
===========================

A Laravel form builder package similar to FormCollective with essential form building functionality

v1.0.3(3mo ago)19MITPHPPHP ^8.2

Since Sep 4Pushed 3mo agoCompare

[ Source](https://github.com/djigir/laravel-form-builder)[ Packagist](https://packagist.org/packages/djigir/laravel-form-builder)[ RSS](/packages/djigir-laravel-form-builder/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

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

[](#laravel-form-builder)

A Laravel form builder package similar to FormCollective with essential form building functionality.

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

[](#installation)

You can install the package via Composer:

```
composer require djigir/laravel-form-builder
```

For Laravel 11+ the package will be auto-discovered. For older versions, add the service provider and facade to your `config/app.php`:

```
// config/app.php

'providers' => [
    // ...
    Djigir\LaravelFormBuilder\FormServiceProvider::class,
],

'aliases' => [
    // ...
    'Form' => Djigir\LaravelFormBuilder\Facades\Form::class,
],
```

Usage
-----

[](#usage)

### Opening and Closing Forms

[](#opening-and-closing-forms)

```
// Basic form
{!! Form::open(['action' => 'UserController@store']) !!}
{!! Form::close() !!}

// Form with route
{!! Form::open(['route' => 'users.store']) !!}
{!! Form::close() !!}

// Form with route parameters
{!! Form::open(['route' => ['users.update', $user->id], 'method' => 'PUT']) !!}
{!! Form::close() !!}

// Form with model binding
{!! Form::model($user, ['route' => ['users.update', $user->id], 'method' => 'PUT']) !!}
{!! Form::close() !!}
```

### Input Fields

[](#input-fields)

```
// Text input
{!! Form::text('username') !!}
{!! Form::text('username', 'Default Value') !!}
{!! Form::text('username', null, ['class' => 'form-control']) !!}

// Email input
{!! Form::email('email') !!}

// Password input
{!! Form::password('password') !!}

// Number input
{!! Form::number('age') !!}

// Tel input
{!! Form::tel('phone') !!}

// Date inputs
{!! Form::date('birth_date') !!}
{!! Form::datetime('created_at') !!}
{!! Form::time('meeting_time') !!}

// Color picker
{!! Form::color('favorite_color') !!}

// Range slider
{!! Form::range('volume', 50) !!}

// File upload
{!! Form::file('avatar') !!}

// Hidden input
{!! Form::hidden('user_id', 1) !!}
```

### Textarea

[](#textarea)

```
{!! Form::textarea('description') !!}
{!! Form::textarea('description', 'Default content') !!}
{!! Form::textarea('description', null, ['rows' => 5, 'cols' => 40]) !!}
```

### Select Dropdowns

[](#select-dropdowns)

```
// Basic select
$options = ['1' => 'Option 1', '2' => 'Option 2'];
{!! Form::select('choice', $options) !!}

// Select with pre-selected value
{!! Form::select('choice', $options, '2') !!}

// Select with attributes
{!! Form::select('choice', $options, null, ['class' => 'form-control']) !!}

// Select range (useful for numbers)
{!! Form::selectRange('quantity', 1, 10) !!}

// Select year dropdown
{!! Form::selectYear('year') !!}
{!! Form::selectYear('year', 1990, 2030) !!}

// Select month dropdown
{!! Form::selectMonth('month') !!}
```

### Checkboxes and Radio Buttons

[](#checkboxes-and-radio-buttons)

```
// Checkbox
{!! Form::checkbox('active', 1) !!}
{!! Form::checkbox('active', 1, true) !!} // checked
{!! Form::checkbox('active', 1, false, ['class' => 'form-check-input']) !!}

// Radio buttons
{!! Form::radio('gender', 'male') !!}
{!! Form::radio('gender', 'female', true) !!} // selected
```

Features
--------

[](#features)

- **Model Binding**: Automatically populate form fields from Eloquent models
- **Old Input**: Automatically repopulate fields with old input data after validation errors
- **CSRF Protection**: Automatic CSRF token inclusion for POST forms
- **Method Spoofing**: Support for PUT, PATCH, DELETE methods via method spoofing
- **Flexible Options**: Support for HTML attributes and CSS classes
- **Type Safety**: All methods return `HtmlString` instances for safe output

Available Methods
-----------------

[](#available-methods)

### Form Methods

[](#form-methods)

- `Form::open($options)` - Open a form
- `Form::model($model, $options)` - Open a form with model binding
- `Form::close()` - Close a form

### Input Methods

[](#input-methods)

- `Form::text($name, $value, $options)`
- `Form::email($name, $value, $options)`
- `Form::password($name, $options)`
- `Form::tel($name, $value, $options)`
- `Form::number($name, $value, $options)`
- `Form::date($name, $value, $options)`
- `Form::datetime($name, $value, $options)`
- `Form::time($name, $value, $options)`
- `Form::color($name, $value, $options)`
- `Form::range($name, $value, $options)`
- `Form::file($name, $options)`
- `Form::hidden($name, $value, $options)`

### Other Elements

[](#other-elements)

- `Form::textarea($name, $value, $options)`
- `Form::select($name, $options, $selected, $attributes)`
- `Form::selectRange($name, $start, $end, $selected, $attributes)`
- `Form::selectYear($name, $startYear, $endYear, $selected, $attributes)`
- `Form::selectMonth($name, $selected, $attributes)`
- `Form::checkbox($name, $value, $checked, $options)`
- `Form::radio($name, $value, $checked, $options)`

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11.0+

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance79

Regular maintenance activity

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~46 days

Total

4

Last Release

111d ago

### Community

Maintainers

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

---

Top Contributors

[![djigir](https://avatars.githubusercontent.com/u/63351201?v=4)](https://github.com/djigir "djigir (4 commits)")

---

Tags

laravelhtmlformFormsform-builder

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-form-bridge

This packages integrates Symfony Form Component in Laravel.

163354.8k1](/packages/barryvdh-laravel-form-bridge)[orchestra/html

HTML Component for Orchestra Platform

40112.6k2](/packages/orchestra-html)[inkvizytor/fluentform

Form builder for Laravel

3416.2k](/packages/inkvizytor-fluentform)[okipa/laravel-form-components

Ready-to-use and customizable form components.

198.0k1](/packages/okipa-laravel-form-components)[tapp/filament-form-builder

User facing form builder using Filament components

131.2k1](/packages/tapp-filament-form-builder)

PHPackages © 2026

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