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

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

delboy1978uk/form
=================

Super Easy HTML form generation.

v2.8.0(4mo ago)76.0k3[2 issues](https://github.com/delboy1978uk/form/issues)6MITPHPPHP ^8.2CI passing

Since Nov 29Pushed 4mo ago3 watchersCompare

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

READMEChangelogDependencies (5)Versions (70)Used By (6)

form
====

[](#form)

[![Latest Stable Version](https://camo.githubusercontent.com/c077e91b2a8019285b801f993f181884282732799cf59817687760acbfec273b/68747470733a2f2f706f7365722e707567782e6f72672f64656c626f7931393738756b2f666f726d2f762f737461626c65)](https://packagist.org/packages/delboy1978uk/form) [![Total Downloads](https://camo.githubusercontent.com/9368d9049c71fea35a1c33a66604f98c3f8566cae6a3b381e393ec56a24748c6/68747470733a2f2f706f7365722e707567782e6f72672f64656c626f7931393738756b2f666f726d2f646f776e6c6f616473)](https://packagist.org/packages/delboy1978uk/form) [![Latest Unstable Version](https://camo.githubusercontent.com/87eab38cce5d61857e9829e5990f9614ad4b1305948fa84daacb0a1849e2d9ca/68747470733a2f2f706f7365722e707567782e6f72672f64656c626f7931393738756b2f666f726d2f762f756e737461626c65)](https://packagist.org/packages/delboy1978uk/form) [![License](https://camo.githubusercontent.com/17a6ac1df17c7dea32a841a443c561027d51a23f1bed59e988d4078129063cb8/68747470733a2f2f706f7365722e707567782e6f72672f64656c626f7931393738756b2f666f726d2f6c6963656e7365)](https://packagist.org/packages/delboy1978uk/form)
[![build status](https://github.com/delboy1978uk/form/actions/workflows/master.yml/badge.svg)](https://github.com/delboy1978uk/form/actions/workflows/master.yml/badge.svg) [![Code Coverage](https://camo.githubusercontent.com/57751de46fcd630d4d27b12f33459807d9275c68c0f9663290c2cff5dbaa45d9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656c626f7931393738756b2f666f726d2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/delboy1978uk/form/?branch=master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/578dd6b31bd5930717c1cae2db2c849989687a09c22f9f1b38d48bb8ea4613fd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656c626f7931393738756b2f666f726d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/delboy1978uk/form/?branch=master)
A super easy Bootstrap ready HTML form generator for PHP

[![An example generated form](https://raw.githubusercontent.com/delboy1978uk/form/master/tests/_data/form.png)](https://raw.githubusercontent.com/delboy1978uk/form/master/tests/_data/form.png)

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

[](#installation)

Install via composer

```
composer require delboy1978uk/form

```

Usage
-----

[](#usage)

There are several ways too use this library, dependimng on your style. You can build everything up yourself by adding fields to your form instance, or you can extend the form and define it there, or you can add a trait to your object and add attributes to your properties, which you can pass into the form factory.

Here's the 'long way'. Firstly, "use" all the classes you'll need for your form. Then create your form and fields.

```
