PHPackages                             vojtech-dobes/nette-forms-inputlist - 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. [Templating &amp; Views](/categories/templating)
4. /
5. vojtech-dobes/nette-forms-inputlist

ActiveLibrary[Templating &amp; Views](/categories/templating)

vojtech-dobes/nette-forms-inputlist
===================================

Alternative RadioList &amp; CheckboxList for Nette Framework

1.0.4(13y ago)241.2k9[2 issues](https://github.com/vojtech-dobes/nette-forms-inputlist/issues)New BSDPHPPHP &gt;=5.3.2

Since Dec 9Pushed 13y ago7 watchersCompare

[ Source](https://github.com/vojtech-dobes/nette-forms-inputlist)[ Packagist](https://packagist.org/packages/vojtech-dobes/nette-forms-inputlist)[ Docs](http://github.com/vojtech-dobes/nette-forms-inputlist)[ RSS](/packages/vojtech-dobes-nette-forms-inputlist/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

For Nette Framework
-------------------

[](#for-nette-framework)

Alternative RadioList &amp; CheckboxList for Nette Framework

##### License

[](#license)

New BSD

##### Dependencies

[](#dependencies)

Nette 2.0.0

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

[](#installation)

1. Get the source code from Github or via Composer (`vojtech-dobes/nette-forms-inputlist`).
2. Register `VojtechDobes\NetteForms\InputListExtension` as extension for `$configurator`.

```
$configurator->onCompile[] = function ($configurator, $compiler) {
	$compiler->addExtension('inputlist', new VojtechDobes\NetteForms\InputListExtension);
};
```

Usage
-----

[](#usage)

#### RadioList

[](#radiolist)

```
$form->addMultiRadio('sex', 'Sex:', array(
	'male' => 'Male',
	'female' => 'Female',
));
```

> Method's name was chosen to not interfere with native `addRadiolist`.

#### CheckboxList

[](#checkboxlist)

```
$checkboxlist = $form->addMultiCheckbox('topics', 'I like:', array(
	'l' => 'lifestyle',
	'm' => 'military',
	'c' => 'computers',
	'f' => 'flowers',
));
```

##### Defaults

[](#defaults)

```
$checkboxlist->setDefaultValue(array('l', 'm')); // lifestyle, military
```

##### Returned values

[](#returned-values)

```
$checkboxlist->getValue() === array(0 => 'l', 1 => 'm')
```

### Rendering

[](#rendering)

#### Automatic

[](#automatic)

Both `RadioList` and `CheckboxList` provide standard mechanism like `getControlPrototype` etc. You can also force omitting of last separator:

```
$radiolist->omitLastSeparator();
```

#### Manual

[](#manual)

There is special new macro for Latte templates: `{inputlist}`. It behaves exactly like `{foreach}`, but it's specifically design to work with `*List` form elements.

```
{form formName}
	{inputlist sex as $key => $label}
		{input} {label /} {sep}{/sep}
	{/inputlist}
{/form}
```

Macros `{input}` and `{label}` behave the same way as always, but when used without element identificator, they will render proper elements for iteration specific item. If you use it with identificator, it will render appropriate element from form.

```
{form formName}
	{inputlist sex as $key => $label}
		{input} {label /}
		{input send} {* standard button, no problem *}
	{/inputlist}
{/form}
```

You can add HTML attributes to them as usually.

```
{form formName}
	{inputlist sex as $key => $label}
		{input class => 'input-radio'} {label}{$label}{/label}
	{/inputlist}
{/form}
```

Attribute version of `{inputlist}` is also possible:

```
{form formName}

		{input} {label /}

{/form}
```

### Validation

[](#validation)

Here supported rules are listed:

#### CheckboxList

[](#checkboxlist-1)

  Form::FILLED At least one box must be checked.   Form::LENGTH Exact amount of boxes that must be checked.   Form::MIN\_LENGTH Minimum amount of boxes that must be checked.   Form::MAX\_LENGTH Maximum amount of boxes that must be checked.   Form::RANGE Minimum and maximum amount of boxes that must be checked.   Form::REGEXP Checks if selected checkbox values match regular expression. #### RadioList

[](#radiolist-1)

  Form::FILLED One button must be selected.   Form::REGEXP Checks if selected radio value matches regular expression. All rules are also supported on client-side.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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 ~28 days

Total

5

Last Release

4793d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/920689f25a0fc31b2807556eddd47203f33c4318893bce98818cf2f3e627ee8e?d=identicon)[vojtechdobes](/maintainers/vojtechdobes)

---

Top Contributors

[![vojtech-dobes](https://avatars.githubusercontent.com/u/415925?v=4)](https://github.com/vojtech-dobes "vojtech-dobes (8 commits)")[![enumag](https://avatars.githubusercontent.com/u/539462?v=4)](https://github.com/enumag "enumag (1 commits)")[![jasir](https://avatars.githubusercontent.com/u/115066?v=4)](https://github.com/jasir "jasir (1 commits)")[![tivvit](https://avatars.githubusercontent.com/u/3392931?v=4)](https://github.com/tivvit "tivvit (1 commits)")[![uestla](https://avatars.githubusercontent.com/u/373888?v=4)](https://github.com/uestla "uestla (1 commits)")

---

Tags

netteFormsradiolistcheckboxlist

### Embed Badge

![Health badge](/badges/vojtech-dobes-nette-forms-inputlist/health.svg)

```
[![Health](https://phpackages.com/badges/vojtech-dobes-nette-forms-inputlist/health.svg)](https://phpackages.com/packages/vojtech-dobes-nette-forms-inputlist)
```

###  Alternatives

[contributte/forms-bootstrap

Nette extension for Bootstrap forms

211.1M4](/packages/contributte-forms-bootstrap)[nepada/form-renderer

Latte template based form renderer for Nette forms with full support for Bootstrap 3, 4 &amp; 5.

11251.0k](/packages/nepada-form-renderer)[nextras/forms-rendering

Rendering helpers for Nette Framework Forms.

1698.4k2](/packages/nextras-forms-rendering)

PHPackages © 2026

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