PHPackages                             nodus-it/livewire-forms - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. nodus-it/livewire-forms

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

nodus-it/livewire-forms
=======================

A awesome package for easy dynamic forms with Laravel Livewire and Bootstrap v4

v0.11.2(2mo ago)82.2k1MITPHPPHP ^8.3CI passing

Since Dec 1Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/nodus-it/livewire-forms)[ Packagist](https://packagist.org/packages/nodus-it/livewire-forms)[ RSS](/packages/nodus-it-livewire-forms/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (10)Dependencies (5)Versions (17)Used By (0)

Livewire Forms
==============

[](#livewire-forms)

[![License](https://camo.githubusercontent.com/678db8ddb94cf429b3dfaeea31fbaf8a74417c603a7290a51aa98775a99aba44/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6475732d69742f6c697665776972652d666f726d732f6c6963656e7365)](https://packagist.org/packages/nodus-it/livewire-forms)[![Latest Stable Version](https://camo.githubusercontent.com/48edebd88d7ee8cf24278b4da5e9591ba024bddedab9c43a78a62f8c81d6b090/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6475732d69742f6c697665776972652d666f726d732f762f737461626c65)](https://packagist.org/packages/nodus-it/livewire-forms)[![Total Downloads](https://camo.githubusercontent.com/4b14fce7f1083613d316b2817c7d0d1789808d5e8a91050fce423d6958e6d332/68747470733a2f2f706f7365722e707567782e6f72672f6e6f6475732d69742f6c697665776972652d666f726d732f646f776e6c6f616473)](https://packagist.org/packages/nodus-it/livewire-forms)[![Unit-Tests](https://github.com/nodus-it/livewire-forms/actions/workflows/unittests.yml/badge.svg)](https://github.com/nodus-it/livewire-forms/actions/workflows/unittests.yml)[![codecov](https://camo.githubusercontent.com/c26d44e4e9576d234ac5a763d6022f75da4da7cdc0579814f62b52da0dc3b046/68747470733a2f2f636f6465636f762e696f2f67682f6e6f6475732d69742f6c697665776972652d646174617461626c65732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/nodus-it/livewire-forms)

*An awesome package for easy dynamic forms with **Laravel Livewire** and **Bootstrap v4**.*

Some special input types may require external javascript dependencies (besides Bootstrap).

The following inputs are currently supported:

- Checkbox
- Code (requires [CodeMirror.js](https://codemirror.net/))
- Color
- Date
- Datetime (composed of a date and a time input)
- Decimal/Money (own implementation with currency and custom unit support)
- File
- Hidden
- Number
- Password
- Radio (Bootstrap radio button group)
- RichTextarea (requires [Quill.js](https://quilljs.com/))
- Select (requires [bootstrap-select](https://developer.snapappointments.com/bootstrap-select/))
- Text
- Textarea
- Time
- *It's also possible to create your own custom input types*...

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

[](#installation)

You can install the package via composer:

```
composer require nodus-it/livewire-forms

```

Include the JavaScript after the `@livewireScripts` directive on every page that will be using Livewire.

```
...

    ...
    @livewireScripts

```

You can publish the config file with:

```
php artisan vendor:publish --provider="Nodus\Packages\LivewireForms\LivewireFormsServiceProvider" --tag="livewire-forms:config"

```

You can publish the blade views with:

```
php artisan vendor:publish --provider="Nodus\Packages\LivewireForms\LivewireFormsServiceProvider" --tag="livewire-forms:views"

```

Usage
-----

[](#usage)

### Minimal form view example

[](#minimal-form-view-example)

```
class UserForm extends FormView
{
    public function inputs()
    {
        $this->addText('name')
            ->setValidations('required|unique:users,name')
            ->setSize(4);
        $this->addSelect('country')
            ->setOptions(['DE' => ['label' => 'DE']])
            ->setValidations('required')
            ->setDefaultValue('DE');
        $this->addInput(CustomFileUploadInput::class, 'picture')

        $this->addSection('tenants.views.contact');
        $this->addText('email')
            ->setValidations('required|email');
        $this->addText('phone')
            ->setValidations('required');
    }

    public function submitCreate(array $values)
    {
        User::query()->create($values);

        return redirect()->back();
    }

    public function submitUpdate(array $values, User $user)
    {
        $user->update($values);

        return redirect()->back();
    }
}
```

### View integration

[](#view-integration)

Add your created form like any other Livewire component to your blade templates:

```

```

In case you want to prepopulate the input fields with an existing dataset, pass the desired model or array as attribute:

```

```

If you need to pass some custom data inside your forms, you can do so by passing additional data as array via the "additional-view-parameter" attribute:

```

```

All the given additional parameter can then be acccess directly in your form like so:

```
public function submitCreate(array $values)
{
    $this->customKey // resolves via __get() Magic to "customData"
}
```

Roadmap/TODO
------------

[](#roadmaptodo)

- File input
    - chunked upload handling ()
- All Inputs
    - improve multiple support
    - check if we should support more properties
    - custom property system
- New inputs
    - High-level input types e.g. Phone or Email (incl. automatic validation and input mode defaults)
    - Maybe add also support for native select inputs
- Extensibility
    - override default classes (class overload)
    - external extensions (e.g. remote select)
        - remote loading is not supported by bootstrap select
        - maybe move to alternative select plugin package (e.g. )
- Post Handling
    - Validation: add support for array validation rules
    - Improve validation exception handling if such is thrown inside the submit methods
- Find another solution for the integration of external plugins like bootstrap-select than using "wire:ignore" due to several drawbacks that come with this, such as no possibility for dynamic select option updates.

Testing
-------

[](#testing)

```
composer test

```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENCE) for more information.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance83

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% 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 ~146 days

Recently: every ~175 days

Total

14

Last Release

84d ago

PHP version history (6 changes)v0.1-alphaPHP ^7.4

v0.2PHP ^7.4 || ^8.0

v0.5PHP ^8.0 || ^8.1

v0.6PHP ^8.0 || ^8.1 || ^8.2

v0.7PHP ^8.1

v0.10PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/030fe5fffddf0c329473564b64057c625a3a6e92b0841650d6b196fbc644e0a6?d=identicon)[bastian-schur](/maintainers/bastian-schur)

---

Top Contributors

[![dtvmedia](https://avatars.githubusercontent.com/u/18654895?v=4)](https://github.com/dtvmedia "dtvmedia (167 commits)")[![bastian-schur](https://avatars.githubusercontent.com/u/2923151?v=4)](https://github.com/bastian-schur "bastian-schur (10 commits)")

---

Tags

bootstrapformslaravellivewirevalidation

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/nodus-it-livewire-forms/health.svg)

```
[![Health](https://phpackages.com/badges/nodus-it-livewire-forms/health.svg)](https://phpackages.com/packages/nodus-it-livewire-forms)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)

PHPackages © 2026

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