PHPackages                             markhilton/formfields - 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. markhilton/formfields

ActiveLibrary

markhilton/formfields
=====================

Laravel 5 form fields HTML generator sourced from Blade template engine views.

1116HTML

Since Jul 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/markhilton/formfields)[ Packagist](https://packagist.org/packages/markhilton/formfields)[ RSS](/packages/markhilton-formfields/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

FormFields
==========

[](#formfields)

FormFields is a collection of editable Laravel Blade views to render bootstrap responsive HTML content for individual form fields. The form configuration is fetched from ORM model.

It also contains a class to queue linked and inline supporting javascripts.

Main features
-------------

[](#main-features)

- read form fields configurtion directly from ORM models
- render individual HTML content for form fields
- support for required javascripts included in form fields template
- support for Laravel Blade template engine

Setup
-----

[](#setup)

Add to your **config/app.php**

```
'providers' => [
	...
    MarkHilton\FormFields\FormFieldsServiceProvider::class,
],

'aliases' => [
	...
    'jsQueue'     => MarkHilton\FormFields\jsQueue::class,
    'FormBuilder' => MarkHilton\FormFields\FormBuilder::class,
],
```

inside app root folder copy config file:

```
cp vendors/markhilton/formfields/config/formfields.php configs/formfields.php
```

### Model

[](#model)

```
class Your_Model_Name extends Model
{
    public static $errors = [];

    // ... //

    // HTML form builder definitions
    public static $form = [
        'name' => [
            'type'         => 'input',
            'label'        => 'Label name',
            'position'     => 'top',
        ],

        'status'           => [
            'type'         => 'select',
            'label'        => 'Status',
            'position'     => 'side',
            'choice'       => [
              'active'   => 'Active',
              'pending'  => 'Pending',
              'suspended'=> 'Suspended',
            ],
            'default'      => 'active',
        ],

    // ... //
```

### Controller

[](#controller)

```
namespace App\Http\Controllers;

use App\Http\Requests;
use App\Http\Controllers\Controller;

use App\Your_Model_Name;
use Illuminate\Http\Request;

class SiteController extends Controller {

    public function create(Request $request)
    {
        $form = \FormBuilder::build(Your_Model_Name::$form, $request->old() ? $request->old() : []),

        return view('layout', $form);

    // ... //
```

### View

[](#view)

```

    {{ $status }}

    {{ $name }}

```

### HTML output

[](#html-output)

```

            Active
            Pending
            Suspended

        Name

```

Usage
-----

[](#usage)

Queue for linked and inline javascripts inside view template

### Controller

[](#controller-1)

- **jsQueue::push('\[javascript code\]');** to push javascripts code to the queue
- **jsQueue::link('\[javascript file\]');** to add linked javascripts files

### View

[](#view-1)

add **{{ jsQueue::render() }}** call in template header or footer in order to render queued javascripts

### How to steps

[](#how-to-steps)

1. Define $form property in ORM model
2. Assign HTML form fields output from \\FormBuilder::build(ORM\_MODEL::$form);
3. Render form field in the template with {{ $field\_name }}

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/markhilton-formfields/health.svg)

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

PHPackages © 2026

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