PHPackages                             prograhammer/inputter - 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. prograhammer/inputter

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

prograhammer/inputter
=====================

An easy way to manage input fields

026PHP

Since Dec 13Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

\#Inputter A Flexible Form Input Control

\##Build Status

In Beta at the moment...check back soon!

\##Version

The current version is considered Beta. This means that it is *ready enough* to test and use, but beware that you should update frequently.

As this software is **BETA**, **Use at your own risk**!

Changelog
---------

[](#changelog)

Changelog can be found [here](https://github.com/prograhammer/inputter/blob/master/CHANGELOG.md)

Table of contents
-----------------

[](#table-of-contents)

1. [Quick Feature Highlight](#quick-feature-highlight)
2. [Installation](#installation)
3. [Detailed Usage and Server-side Setup](#detailed-usage-and-server-side-setup)
4. [Extend Inputter and Use](#usage-in-controllers)
5. [Input Types and Public Properties](#types)
6. [Use with Laravel 5](#use-with-laravel-5)
7. [Controller Dependency Injection &amp; Validation](#controller-validation)
8. [Blade Template Views](#views)
9. [Client-side Use](#child-form)
10. [Script Setup](#declaration)
11. [Basic Options](#options)
12. [Ajax Options](#ajax)
13. [HTML history and pushState](#push-state)
14. [Cascading Inputs](#cascading)
15. [Roll Your Own](#roll-your-own)
16. [Issues and bug reporting](#issues-and-bug-reporting)
17. [License](#license)

\#Quick Feature Highlight

- Clean usage:

    ```
      $exampleInput = new MyExampleInput;
      $exampleInput->fill($_GET);     // render();    // addField("state_id", "select")
           ->setValue("")
           ->setCascadeTo("city_id")
           ->setAttribs([
                 "style" => "width:100px;",
                 "class"=> "form-control"
             ])
           ->setOptions(function(){
                  // some logic here that returns all the choices appearing in the drop-down box
             });

      $this->addField("city_id", "select")
           ->setValue("")
           ...

    ```
- Simplifies client-side code:

    ```
      // Client-side jQuery as simple as this
      $(".my-example").inputter({
            // set some options here
      });

    ```
- Client-side methods available to help you (and you don't need to rely on `` tags):

    ```
      // Gather all the values from the inputs
      var data = $(".my-example").data("inputter").get();
      alert(data.state_id);   //
