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

ActiveLibrary

ironflow/form-builder
=====================

Dynamic form builder for Laravel with HaloUI integration

v1.0.2(6mo ago)15MITPHPPHP ^8.2CI passing

Since Oct 23Pushed 6mo agoCompare

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

READMEChangelog (3)Dependencies (10)Versions (4)Used By (0)

IronFlow Form Builder
=====================

[](#ironflow-form-builder)

 [![IronFlow Logo](./ironflow-logo.png)](./ironflow-logo.png)

 **Dynamic Form Builder for Laravel with HaloUI Integration**
 Build powerful, schema-driven forms using JSON or a fluent PHP API.

---

Overview
--------

[](#overview)

**IronFlow Form Builder** provides a structured and extensible way to build and render dynamic forms in Laravel. It integrates seamlessly with **[HaloUI](https://github.com/AureDulvresse/halo-ui)** components, supports **JSON schemas**, and includes a **fluent, object-oriented API** for developers who prefer code-based configuration.

The goal is simple: to enable developers to define forms once and render them anywhere—without repetitive HTML, inconsistent validation, or unnecessary boilerplate.

---

Features
--------

[](#features)

- JSON schema-based form definitions
- Seamless integration with HaloUI components
- Fluent and expressive PHP API
- Multi-step (wizard) form support
- Built-in Laravel validation
- Conditional and dynamic fields
- More than 16 supported field types
- Zero configuration required for HaloUI projects

---

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

[](#requirements)

- PHP 8.2 or higher
- Laravel 11.x or 12.x
- HaloUI 2.0 or higher

---

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

[](#installation)

```
composer require ironflow/form-builder
```

(Optional) Publish the configuration file:

```
php artisan vendor:publish --tag=form-builder-config
```

---

Quick Start
-----------

[](#quick-start)

### Using JSON Schema

[](#using-json-schema)

```

```

### Using the Fluent PHP API

[](#using-the-fluent-php-api)

```
use IronFlow\FormBuilder\FormSchema;

$schema = FormSchema::make()
    ->title('User Registration')
    ->text('name')->label('Full Name')->required()
    ->text('email')->email()->label('Email Address')->required()
    ->text('password')
        ->type('password')
        ->label('Password')
        ->required()
        ->validation('min:8|confirmed')
    ->toArray();

return view('register', ['schema' => $schema]);
```

---

Supported Field Types
---------------------

[](#supported-field-types)

TypeDescriptionHaloUI ComponenttextText inputhalo.inputemailEmail inputhalo.inputpasswordPassword inputhalo.inputnumberNumber inputhalo.inputtextareaMulti-line texthalo.textareaselectDropdown listhalo.selectcheckboxCheckboxhalo.checkboxradioRadio buttonshalo.radioswitchToggle switchhalo.switchfileFile uploadhalo.file-uploaddateDate pickerhalo.date-pickertimeTime pickerhalo.time-pickercolorColor pickerhalo.color-pickerrangeRange sliderhalo.slider-rangeratingStar ratinghalo.rating---

Multi-Step Forms
----------------

[](#multi-step-forms)

```
$schema = FormSchema::make()
   ->title('Onboarding')
   ->step('Personal Info', function($step) {
       $step->text('first_name')->label('First Name')->required();
       $step->text('last_name')->label('Last Name')->required();
       $step->text('email')->email()->label('Email')->required();
   })
   ->step('Company Details', function($step) {
       $step->text('company_name')->label('Company')->required();
       $step->select('company_size')
           ->label('Company Size')
           ->options([
               '1-10' => '1–10 employees',
               '11-50' => '11–50 employees',
               '51-200' => '51–200 employees',
           ])
           ->required();
   })
   ->toArray();
```

---

Validation
----------

[](#validation)

### In Schema

[](#in-schema)

```
$schema = FormSchema::make()
   ->text('email')
       ->label('Email')
       ->validation('required|email|unique:users,email')
   ->text('password')
       ->label('Password')
       ->validation('required|min:8|confirmed')
   ->toArray();
```

### In Controller

[](#in-controller)

```
use IronFlow\FormBuilder\FormBuilder;

public function store(Request $request)
{
    $builder = app(FormBuilder::class);
    $builder->make($schema);

    $validated = $builder->validate($request->all());

    if (empty($validated)) {
        return back()
            ->withInput()
            ->withErrors($builder->errors);
    }

    // Process validated data
}
```

---

JSON-Based Forms
----------------

[](#json-based-forms)

You can store form schemas as JSON and load them dynamically:

```
{
  "title": "Feedback Form",
  "description": "We'd love to hear from you",
  "fields": [
    { "type": "textarea", "name": "comments", "label": "Comments", "rows": 5 },
    { "type": "text", "name": "name", "label": "Your Name", "required": true, "validation": "required|min:3" },
    { "type": "select", "name": "rating", "label": "Rating", "required": true,
      "options": { "5": "Excellent", "4": "Good", "3": "Average", "2": "Poor", "1": "Very Poor" }
    }
  ]
}
```

### Loading the Form

[](#loading-the-form)

```
public function show($formId)
{
    $json = file_get_contents(storage_path("forms/{$formId}.json"));
    $schema = json_decode($json, true);

    return view('forms.show', ['schema' => $schema]);
}
```

---

Conditional Fields
------------------

[](#conditional-fields)

```

       Individual
       Business

```

---

Custom Actions
--------------

[](#custom-actions)

```

       Save Draft

           Cancel
           Submit

```

---

Integration with HaloUI
-----------------------

[](#integration-with-haloui)

```

       Application Form

```

---

Configuration
-------------

[](#configuration)

```
// config/form-builder.php

return [
   'default_component' => 'halo',

   'field_mapping' => [
       'text' => 'halo.input',
       'email' => 'halo.input',
       'select' => 'halo.select',
       // Extend or override as needed
   ],

   'validation' => [
       'show_errors' => true,
       'error_class' => 'text-red-600 text-sm mt-1',
   ],

   'layout' => [
       'grid_cols' => 1,
       'gap' => 6,
   ],
];
```

---

API Reference
-------------

[](#api-reference)

### FormSchema

[](#formschema)

```
FormSchema::make()
   ->title(string $title)
   ->description(string $description)
   ->text(string $name)
   ->select(string $name)
   ->addField(BaseField $field)
   ->step(string $name, callable $callback)
   ->toArray();
```

### Field Methods

[](#field-methods)

```
$field
   ->name(string $name)
   ->label(string $label)
   ->placeholder(string $placeholder)
   ->required(bool $required = true)
   ->default($value)
   ->validation(string|array $rules)
   ->attributes(array $attributes)
   ->toJson();
```

---

Example: Registration Form
--------------------------

[](#example-registration-form)

```
$schema = FormSchema::make()
   ->title('Create Your Account')
   ->description('Join thousands of satisfied users')
   ->text('first_name')
       ->label('First Name')
       ->placeholder('John')
       ->required()
       ->validation('min:2|max:50')
   ->text('last_name')
       ->label('Last Name')
       ->placeholder('Doe')
       ->required()
       ->validation('min:2|max:50')
   ->text('email')
       ->email()
       ->label('Email Address')
       ->placeholder('john@example.com')
       ->required()
   ->text('password')
       ->type('password')
       ->label('Password')
       ->placeholder('••••••••')
       ->required()
       ->validation('min:8|confirmed')
   ->text('password_confirmation')
       ->type('password')
       ->label('Confirm Password')
       ->required()
   ->select('country')
       ->label('Country')
       ->options([
           'us' => 'United States',
           'uk' => 'United Kingdom',
           'ca' => 'Canada',
           'au' => 'Australia',
       ])
       ->required()
   ->toArray();
```

---

Testing
-------

[](#testing)

```
composer test
```

---

Contributing
------------

[](#contributing)

Contributions are welcome and appreciated. Please review the [CONTRIBUTING.md](CONTRIBUTING.md) file before submitting pull requests.

---

License
-------

[](#license)

IronFlow Form Builder is open-source software licensed under the [MIT License](LICENSE.md).

---

Credits
-------

[](#credits)

- Built for [HaloUI](https://github.com/AureDulvresse/halo-ui)
- Inspired by modern form builders
- Powered by Laravel

---

Support
-------

[](#support)

- Email: ****
- Discord: [Join our community](https://discord.gg/ironflow)
- Issues: [GitHub Issues](https://github.com/ironflow/form-builder/issues)
- Documentation: [ironflow.dev/docs](https://ironflow.dev/docs)

---

**Made with care by Aure Dulvresse***Designed for developers who value structure, elegance, and clarity.*

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance66

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Total

3

Last Release

207d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/34b2d64120e90ff9a631fe377dd251173cf50f8681674570b30fa0e1d9ed9576?d=identicon)[AureDulvresse](/maintainers/AureDulvresse)

---

Top Contributors

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

---

Tags

laravelbuilderformdynamichaloui

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[kris/laravel-form-builder

Laravel form builder - symfony like

1.7k2.2M45](/packages/kris-laravel-form-builder)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[barryvdh/laravel-form-bridge

This packages integrates Symfony Form Component in Laravel.

163354.8k1](/packages/barryvdh-laravel-form-bridge)[inkvizytor/fluentform

Form builder for Laravel

3416.2k](/packages/inkvizytor-fluentform)[illuminatech/data-provider

Allows easy build for DB queries from API requests

4413.3k](/packages/illuminatech-data-provider)[laraform/laraform-laravel

Laraform Community Edition (Laravel)

1537.0k](/packages/laraform-laraform-laravel)

PHPackages © 2026

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