PHPackages                             bonzer/inputs - 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. bonzer/inputs

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

bonzer/inputs
=============

A form inputs library

v0.0.4(1y ago)0511MITPHPPHP &gt;=5.4.0

Since Apr 14Pushed 1y agoCompare

[ Source](https://github.com/parasralhan/form-fields)[ Packagist](https://packagist.org/packages/bonzer/inputs)[ RSS](/packages/bonzer-inputs/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (4)Versions (5)Used By (1)

HTML Form Fields.
=================

[](#html-form-fields)

A utility Library with minimal interface giving you the ability to create HTML form fields with added functionality.

Form Fields included are

- text
- multi-text
- multi-text-calendar
- textarea
- select
- multi-select
- icon
- color
- calendar
- heading
- radio
- checkbox

Getting Started
---------------

[](#getting-started)

### Prerequisites

[](#prerequisites)

- **PHP** - the following PHP dependencies are required for complete working of form fields
    - PHP &gt;= 5.4
    - "bonzer/exceptions" : "dev-master"
    - "oyejorge/less.php" : "v1.7.0.14"
- **Javascript** - the following javacsript dependencies are required for complete working of form fields
    - jquery
    - jquery-ui
        (Includes: draggable, core, resizable, selectable, sortable, datepicker, menu, selectmenu, button, tooltip)
    - chosen (Multi Select)
    - spectrum (Color Picker)
- **CSS** - the following CSS dependencies are required for complete working of form fields
    - font-awesome
    - jquery-ui
    - jquery-ui.theme
        (Includes: draggable, core, resizable, selectable, sortable, datepicker, menu, selectmenu, button, tooltip, theme)
    - chosen (Multi Select)
    - spectrum (Color Picker)

### Installing

[](#installing)

It can be installed via composer. Run

```
composer require bonzer/inputs

```

### Configuration

[](#configuration)

```
Bonzer\Inputs\config\Configurer::get_instance([
  'load_assets_automatically' => true, // recommended option is false, I have made it true so that library does not break if you don't configure
  'css_excluded' => [ ], // keys for js files you don't want the library to load, You should be responsible for loading them for library
  'js_excluded' => [ ],  // keys for js files you don't want the library to load, You should be responsible for loading them for library
  'env' => 'production', // development | production
  'is_admin' => false // flag you can set to tell library when the fields are opened in ADMIN mode, helpful for Exception handling
  'style' => '1', // 1,2,3
]);

```

The above code must come before any code related to this Library.

- Note: keys to put in `js_excluded` and `css_excluded` can be found in `src/config.php` file

The Library come bundled with required css, js and fonts. As we all know `css` must go in `head tag` and for `js`, recommended option is before ``. For this Library is offering two methods:

```
$Assets_Loader = Bonzer\Inputs\Assets_Loader::get_instance();
$Assets_Loader->load_head_fragment();
$Assets_Loader->load_before_body_close_fragment();

```

but if you intend to use both of these options yourself, turn the `'load_assets_automatically'` key in configuration to `FALSE`. i.e.

```
'load_assets_automatically' => FALSE

```

Usage
-----

[](#usage)

There is a Factory class `Bonzer\Inputs\factories\Input` that has `create` method, The Blueprint of the Method is

```
  /**
   * --------------------------------------------------------------------------
   * Create the Input field
   * --------------------------------------------------------------------------
   *
   * @param string $type | input type ('calendar', 'checkbox', 'color', 'heading', 'icon', 'multi-select', 'multi-text', 'multi-text-calendar', 'radio', 'select', 'text', 'textarea',)
   * @param array $args
   *
   * @Return string
   * */
   public function create( $type, $args );

```

second argument `$args` has blueprint as follows:

```
$args = [
   'name' => $field_name,    string
   'id' => $field_id,        string
   'label' => $field_label,  string
   'placeholder' => $field_placeholder,  string
   'value' => $value,        string
   'desc' => $description,   string
   'options' => $options,    array
   'attrs' => $attrs,        array
];

```

### Examples

[](#examples)

```
$input = Bonzer\Inputs\factories\Input::get_instance();
echo $input->create('text', [
  'id' => 'text',
  'placeholder' => 'Hello',
  'value' => '',
]);
echo $input->create('icon', [
  'id' => 'icon',
  'placeholder' => 'select icon',
  'value' => '',
]);
echo $input->create('multi-text', [
  'id' => 'multi-text',
  'placeholder' => 'Hello',
  'value' => '',
]);
echo $input->create('calendar', [
  'id' => 'calendar',
  'placeholder' => 'Calendar',
  'value' => '',
]);
echo $input->create('multi-text-calendar', [
  'id' => 'multi-text-calendar',
  'placeholder' => 'Multi Text Calendar',
  'value' => '',
]);
echo $input->create('textarea', [
  'id' => 'textarea',
  'placeholder' => 'Textarea',
  'value' => '',
]);
echo $input->create('select', [
  'id' => 'select',
  'options' => [
    'hello' => 'Hello',
    'world' => 'World',
  ],
]);
echo $input->create('multi-select', [
  'id' => 'multi-select',
  'options' => [
    'hello' => 'Hello',
    'world' => 'World',
  ],
]);
echo $input->create('color', [
  'id' => 'color',
  'placeholder' => 'Hello',
  'value' => '',
]);

```

Support
-------

[](#support)

If you are having issues, please let me know.
You can contact me at

Credits
-------

[](#credits)

- Font Awesome
- Vector Icons -- [Pixel Buddha](http://www.flaticon.com/authors/pixel-buddha "Pixel Buddha") from [www.flaticon.com](http://www.flaticon.com "Flaticon") is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/ "Creative Commons BY 3.0")

License
-------

[](#license)

The project is licensed under the MIT license.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~771 days

Total

4

Last Release

641d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64f6c4cc8c518c09b0899e69c50d9068b0470f667bbc827bbc1892b1e72aea99?d=identicon)[parasralhan](/maintainers/parasralhan)

---

Top Contributors

[![parasralhan](https://avatars.githubusercontent.com/u/37013182?v=4)](https://github.com/parasralhan "parasralhan (33 commits)")

### Embed Badge

![Health badge](/badges/bonzer-inputs/health.svg)

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

###  Alternatives

[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[nizsheanez/yii2-asset-converter

Less, Sass, Scss and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

64167.5k6](/packages/nizsheanez-yii2-asset-converter)[winter/storm

Winter CMS Storm Library

46239.3k6](/packages/winter-storm)[amasty/module-mage-248-fix

Fix several issues on Magento 2.4.8 version by Amasty

11138.7k](/packages/amasty-module-mage-248-fix)

PHPackages © 2026

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