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

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

openlss/lib-form
================

Abstract set of common handling for Form helper libraries

0.0.7(13y ago)091LGPL-3.0+PHPPHP &gt;=5.3.2

Since Mar 26Pushed 13y ago3 watchersCompare

[ Source](https://github.com/nullivex/lib-form)[ Packagist](https://packagist.org/packages/openlss/lib-form)[ Docs](http://openlss.org)[ RSS](/packages/openlss-lib-form/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (9)Used By (0)

openlss/lib-form
================

[](#openlsslib-form)

Form helpers for creating radio buttons, drop downs, and checkboxes

It contains classes for each field type as show below

openlss/lib-form-checkbox
=========================

[](#openlsslib-form-checkbox)

Checkbox builder for HTML pages can be used with various templating

Usage
-----

[](#usage)

```
use \LSS\Form\Checkbox;

$arr = array(1=>'Yes',2=>'Yes, Please',3=>'Alright!');

//pring checkbox form
echo Checkbox::_get()->setOptions($arr)->setName('test')->setValue(1);
```

toString
--------

[](#tostring)

To get the HTML from this class simply transform it to a string.

Examples

```
echo $form_obj;
$checkboxes = (string)$form_obj;
```

Reference
---------

[](#reference)

### (object) \_get()

[](#object-_get)

Shortcut for constructor

### (object) setOptions($arr)

[](#object-setoptionsarr)

Sets the options to this array

### (object) addOption($key,$value)

[](#object-addoptionkeyvalue)

Adds an option

### (object) setName($name)

[](#object-setnamename)

Set name of the checkbox elements

### (object) setValue($value)

[](#object-setvaluevalue)

Set the current value to be checked (can be an array for multiple checkboxes)

### (object) addValue($value)

[](#object-addvaluevalue)

Adds a set value to the array

### (void) breakAfterEach()

[](#void-breakaftereach)

Call this to turn on line breaks after each checkbox

### (object) addCssClass($class)

[](#object-addcssclassclass)

Adds a CSS class to each element

### (objet) addExtra($extra)

[](#objet-addextraextra)

Add extra parameters to the HTML element containing the object

openlss/lib-form-drop
=====================

[](#openlsslib-form-drop)

Dropdown select builder for HTML pages can be used with various templating

Usage
-----

[](#usage-1)

```
use \LSS\Form\Drop;

$arr = array(1=>'Yes',2=>'Yes, Please',3=>'Alright!');

//pring radio form
echo Drop::_get()->setOptions($arr)->setName('test')->setValue(1);
```

toString
--------

[](#tostring-1)

To get the HTML from this class simply transform it to a string.

Examples

```
echo $form_obj;
$drop = (string)$form_obj;
```

Reference
---------

[](#reference-1)

### (object) \_get()

[](#object-_get-1)

Shortcut for constructor

### (object) setOptions($arr)

[](#object-setoptionsarr-1)

Sets the options to this array

### (object) addOption($key,$value)

[](#object-addoptionkeyvalue-1)

Adds an option

### (object) setName($name)

[](#object-setnamename-1)

Set name of the checkbox elements

### (object) setValue($value)

[](#object-setvaluevalue-1)

Set the current value to be checked

### (object) addCssClass($class)

[](#object-addcssclassclass-1)

Adds a CSS class to each element

### (objet) addExtra($extra)

[](#objet-addextraextra-1)

Add extra parameters to the HTML element containing the object

openlss/lib-form-radio
======================

[](#openlsslib-form-radio)

Radio button builder for HTML pages can be used with various templating

Usage
-----

[](#usage-2)

```
use \LSS\Form\Radio;

$arr = array(1=>'Yes',2=>'Yes, Please',3=>'Alright!');

//pring radio form
echo Radio::_get()->setOptions($arr)->setName('test')->setValue(1);
```

toString
--------

[](#tostring-2)

To get the HTML from this class simply transform it to a string.

Examples

```
echo $form_obj;
$radio = (string)$form_obj;
```

Reference
---------

[](#reference-2)

### (object) \_get()

[](#object-_get-2)

Shortcut for constructor

### (object) setOptions($arr)

[](#object-setoptionsarr-2)

Sets the options to this array

### (object) addOption($key,$value)

[](#object-addoptionkeyvalue-2)

Adds an option

### (object) setName($name)

[](#object-setnamename-2)

Set name of the checkbox elements

### (object) setValue($value)

[](#object-setvaluevalue-2)

Set the current value to be checked

### (object) addCssClass($class)

[](#object-addcssclassclass-2)

Adds a CSS class to each element

### (objet) addExtra($extra)

[](#objet-addextraextra-2)

Add extra parameters to the HTML element containing the object

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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 ~2 days

Total

7

Last Release

4832d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83c8e9d55e3ebafb0621a441a51af8f551f61a274fde5400459a29cc320b7b75?d=identicon)[nullivex](/maintainers/nullivex)

---

Top Contributors

[![nullivex](https://avatars.githubusercontent.com/u/2321375?v=4)](https://github.com/nullivex "nullivex (18 commits)")

---

Tags

helperuiformdropdownuser-interfacecheckboxradio

### Embed Badge

![Health badge](/badges/openlss-lib-form/health.svg)

```
[![Health](https://phpackages.com/badges/openlss-lib-form/health.svg)](https://phpackages.com/packages/openlss-lib-form)
```

###  Alternatives

[snapappointments/bootstrap-select

The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more. Now with Bootstrap 4 support.

9.8k501.2k3](/packages/snapappointments-bootstrap-select)[wenzhixin/bootstrap-table

An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)

11.8k287.3k1](/packages/wenzhixin-bootstrap-table)[harvesthq/chosen

Chosen is a JavaScript plugin that makes select boxes user-friendly. It is currently available in both jQuery and Prototype flavors.

405.3M12](/packages/harvesthq-chosen)[kartik-v/yii2-widget-depdrop

Widget that enables setting up dependent dropdowns with nested dependencies (sub repo split from yii2-widgets)

845.2M18](/packages/kartik-v-yii2-widget-depdrop)[jjj/chosen

Chosen is a JavaScript plugin that makes select boxes user-friendly. It is currently available in both jQuery and Prototype flavors.

28597.8k5](/packages/jjj-chosen)[kartik-v/yii2-widget-typeahead

Enhanced Yii2 wrapper for the Twitter Typeahead plugin (sub repo split from yii2-widgets).

475.1M9](/packages/kartik-v-yii2-widget-typeahead)

PHPackages © 2026

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