PHPackages                             fyre/formbuilder - 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. fyre/formbuilder

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

fyre/formbuilder
================

A form builder library.

v4.0.2(8mo ago)0135↓77.8%21MITPHP

Since Apr 1Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/elusivecodes/FyreFormBuilder)[ Packagist](https://packagist.org/packages/fyre/formbuilder)[ RSS](/packages/fyre-formbuilder/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (5)Versions (27)Used By (1)

FyreFormBuilder
===============

[](#fyreformbuilder)

**FyreFormBuilder** is a free, open-source form builder library for *PHP*.

Table Of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Methods](#methods)

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

[](#installation)

**Using Composer**

```
composer require fyre/formbuilder

```

In PHP:

```
use Fyre\Form\FormBuilder;
```

Basic Usage
-----------

[](#basic-usage)

- `$html` is a [*HtmlHelper*](https://github.com/elusivecodes/FyreHTMLHelper).

```
$form = new FormBuilder($html);
```

Methods
-------

[](#methods)

**Button**

Render a button element.

- `$content` is a string representing the button content.
- `$options` is an array of options for rendering the button.

```
$button = $form->button($content, $options);
```

By default, the button content will be HTML escaped. To disable this, set the `escape` value to *false* in the `options` array.

All other `options` will be created as attributes on the button element.

**Close**

Render a form close tag.

```
$close = $form->close();
```

**Fieldset Close**

Render a fieldset close tag.

```
$fieldsetClose = $form->fieldsetClose();
```

**Fieldset Open**

Render a fieldset open tag.

- `$options` is an array of options for rendering the fieldset.

```
$fieldset = $form->fieldsetOpen($options);
```

All `options` will be created as attributes on the fieldset element.

**Input**

Render an input element.

- `$name` is a string representing the input name.
- `$options` is an array of options for rendering the input.

```
$input = $form->input($name, $options);
```

All `options` will be created as attributes on the input element.

By default, the input will be created as a text type. You can use the following helper methods to generate other input type fields.

```
$input = $form->checkbox($name, $options);
$input = $form->color($name, $options);
$input = $form->date($name, $options);
$input = $form->datetime($name, $options);
$input = $form->email($name, $options);
$input = $form->file($name, $options);
$input = $form->hidden($name, $options);
$input = $form->image($name, $options);
$input = $form->month($name, $options);
$input = $form->number($name, $options);
$input = $form->password($name, $options);
$input = $form->radio($name, $options);
$input = $form->range($name, $options);
$input = $form->reset($name, $options);
$input = $form->search($name, $options);
$input = $form->submit($name, $options);
$input = $form->tel($name, $options);
$input = $form->text($name, $options);
$input = $form->time($name, $options);
$input = $form->url($name, $options);
$input = $form->week($name, $options);
```

**Label**

Render a label element.

- `$content` is a string representing the label content.
- `$options` is an array of options for rendering the label.

```
$label = $form->label($content, $options);
```

By default, the label content will be HTML escaped. To disable this, set the `escape` value to *false* in the `options` array.

All other `options` will be created as attributes on the label element.

**Legend**

Render a legend element.

- `$content` is a string representing the legend content.
- `$options` is an array of options for rendering the legend.

```
$legend = $form->legend($content, $options);
```

By default, the legend content will be HTML escaped. To disable this, set the `escape` value to *false* in the `options` array.

All other `options` will be created as attributes on the legend element.

**Open**

Render a form open tag.

- `$action` is a string representing the form action.
- `$options` is an array of options for rendering the form.

```
$open = $form->open($action, $options);
```

All `options` will be created as attributes on the form element.

**Open Multipart**

Render a multipart form open tag.

- `$action` is a string representing the form action.
- `$options` is an array of options for rendering the form.

```
$open = $form->openMultipart($action, $options);
```

All `options` will be created as attributes on the form element.

**Select**

Render a select element.

- `$name` is a string representing the select name.
- `$options` is an array of options for rendering the select.

```
$select = $form->select($name, $options);
```

Option elements can be created by specifying an `options` value in the `options` array. Selected options can be specified using the `selected` value in the `options` array.

All other `options` will be created as attributes on the select element.

**Select Multiple**

Render a multiple select element.

- `$name` is a string representing the select name.
- `$options` is an array of options for rendering the select.

```
$select = $form->selectMulti($name, $options);
```

Option elements can be created by specifying an `options` value in the `options` array. Selected options can be specified using the `selected` value in the `options` array.

All other `options` will be created as attributes on the select element.

**Textarea**

Render a textarea element.

- `$name` is a string representing the textarea name.
- `$options` is an array of options for rendering the textarea.

```
$textarea = $form->textarea($name, $options);
```

All `options` will be created as attributes on the textarea element.

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance62

Regular maintenance activity

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.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 ~52 days

Recently: every ~22 days

Total

26

Last Release

241d ago

Major Versions

v1.0.5 → v2.02023-07-22

v2.0.8 → v3.02024-10-26

v3.1.5 → v4.02025-10-20

### Community

Maintainers

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

---

Top Contributors

[![elusivecodes](https://avatars.githubusercontent.com/u/18050480?v=4)](https://github.com/elusivecodes "elusivecodes (22 commits)")[![pm-michael](https://avatars.githubusercontent.com/u/49225527?v=4)](https://github.com/pm-michael "pm-michael (1 commits)")

---

Tags

builderformphp

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/fyre-formbuilder/health.svg)

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

PHPackages © 2026

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