PHPackages                             beyazitkolemen/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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. beyazitkolemen/form

AbandonedArchivedLibrary[Validation &amp; Sanitization](/categories/validation)

beyazitkolemen/form
===================

A basic framework agnostic form building package with a few extra niceties like remembering old input and retrieving error messages.

030PHP

Since Nov 25Pushed 5y agoCompare

[ Source](https://github.com/beyazitkolemen/form)[ Packagist](https://packagist.org/packages/beyazitkolemen/form)[ RSS](/packages/beyazitkolemen-form/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

> **Important: This package is not actively maintained.** For bug fixes and new features, please fork.

Form
====

[](#form)

[![This Project Has Been Deprecated.](https://camo.githubusercontent.com/3ae650fc7228648d06b62681ce7c397abe96e1677840b72cc69c336a0de863c6/687474703a2f2f7777772e7265706f7374617475732e6f72672f6261646765732f302e312e302f6162616e646f6e65642e737667)](http://www.repostatus.org/#abandoned)[![Code Climate](https://camo.githubusercontent.com/dde268e39dd57ce02fcbc913279b116f46020d863724c85e942aca54945acb28/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6164616d77617468616e2f666f726d2f6261646765732f6770612e737667)](https://codeclimate.com/github/adamwathan/form)[![Coverage Status](https://camo.githubusercontent.com/89b2a1ec3530d76dbaeef3907f5a896b3029e9bc0b02d2e8a045dc3a11314760/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6164616d77617468616e2f666f726d2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/adamwathan/form?branch=master)

Boring name for a boring package. Builds form HTML with a fluent-ish, hopefully intuitive syntax.

- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Remembering Old Input](#remembering-old-input)
- [Error Messages](#error-messages)
- [CSRF Protection](#csrf-protection)
- [Data Binding](#data-binding)

[](#installation)

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

[](#installation)

You can install this package via Composer by running this command in your terminal in the root of your project:

```
composer require beyazitkolemen/form
```

### Laravel

[](#laravel)

> This package works great as a replacement Form Builder that was removed in Laravel 5. The API is different but all of the features are there.

If you are using Laravel 4 or 5, you can register the FormServiceProvider to automatically gain access to the Old Input and Error Message functionality.

To do so, just update the `providers` array in your `config/app.php`:

```
'providers' => [
        //...
        'BeyazitKolemen\Form\FormServiceProvider'
    ],
```

You can also choose to use the Facade by adding an alias in `config/app.php`:

```
'aliases' => [
        //...
        'Form' => 'BeyazitKolemen\Form\Facades\Form',
    ],
```

> Note that in Laravel 4, there is already a Form facade for the built-in Form Builder. If you want to use both, use a different alias. If you'd just like to use this one, remove the Form alias that points to the Illuminate component.

[](#basic-usage)

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

[](#basic-usage)

- [Getting Started](#getting-started)
- [Opening a Form](#opening-a-form)
- [Text and Password Fields](#text-and-password-fields)
- [Textareas](#textareas)
- [Checkboxes and Radio Buttons](#checkboxes-and-radio-buttons)
- [Selects](#selects)
- [Buttons](#buttons)
- [Hidden Inputs](#hidden-inputs)
- [Labels](#labels)
- [Setting Attributes](#setting-attributes)

[](#getting-started)

### Getting Started

[](#getting-started)

First, instantiate a FormBuilder...

```
$builder = new BeyazitKolemen\Form\FormBuilder;
```

Next, use the FormBuilder to build an element. For example:

```
//
