PHPackages                             neondigital/forma - 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. neondigital/forma

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

neondigital/forma
=================

A nice way to play with forms in Laravel 4/5 and indeed any PHP project.

0.0.11(2y ago)01.2kMITPHPPHP ^8.1

Since Mar 15Pushed 2y ago2 watchersCompare

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

READMEChangelog (10)Dependencies (1)Versions (14)Used By (0)

Forma
=====

[](#forma)

IN DEVELOPMENT - But feel free to have a play!

A nice way to play with forms in both Laravel 4 and PHP. Does not require Laravel to be used.

Requires PHP 5.4+

For non-Laravel usage use the following format for calls.

```
use Forma\Forma;

$forma = new Forma();
echo $forma->email('email')->id('inputEmail')->required();

```

Clever Features
---------------

[](#clever-features)

1. Auto-repopulation from Input::get() or Input::old() if value not provided
2. Auto-labels either prepended or wrapped
3. Checkboxes submit even if not checked (hidden input hack)
4. Language file support for label and option text
5. Nest tags within tags
6. Automatic ID creation for labels and fields
7. Chaining of methods to quickly do what you need and force it to behave a certain way
8. Add select options manually and from arrays, great for making a 'Please select' option

Examples
--------

[](#examples)

```

Forma::populate($user);

Forma::open('user','GET')->class('glenn')->class('bob')->attr('id','sweet');

Forma::open_secure('article')->files();

Forma::text('first_name','glennng
