PHPackages                             mvccore/ext-form-field-selection - 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. [Framework](/categories/framework)
4. /
5. mvccore/ext-form-field-selection

ActiveLibrary[Framework](/categories/framework)

mvccore/ext-form-field-selection
================================

MvcCore - Extension - Form - Field - Selection - form field types - select, country select, checkbox, radio button, color and checkboxes group.

v5.3.0(1y ago)241412BSD-3-ClausePHPPHP &gt;=5.4.0

Since Jan 18Pushed 1y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (2)Versions (31)Used By (2)

MvcCore - Extension - Form - Field - Selection
==============================================

[](#mvccore---extension---form---field---selection)

[![Latest Stable Version](https://camo.githubusercontent.com/6a0e9e7da98c52006afe617f10a93df0da2dce64b73eedf5b9b3fcee6bfb6039/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f537461626c652d76352e332e302d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://github.com/mvccore/ext-form-field-selection/releases)[![License](https://camo.githubusercontent.com/53baed538c1c87a033a212f6f4acce684d36137f8622307643ab25e08118452e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d425344253230332d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://mvccore.github.io/docs/mvccore/5.0.0/LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)

MvcCore form extension with fields select, country select, checkbox(es), radios and color.

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

[](#installation)

```
composer require mvccore/ext-form-field-selection
```

Fields And Default Validators
-----------------------------

[](#fields-and-default-validators)

- `select`, country `select`
    - `ValueInOptions`
        - **configured by default**
        - validate if submitted string(s) are presented in select options keys.
- `input:checkbox`
    - `SafeString`
        - **configured by default**
        - XSS string protection to safely display submitted value in response, configured by default
- `input:radio` - radio group and `input:checkbox`es - checkbox group
    - `ValueInOptions` - **configured by default**, ...description above
- `input:color`
    - `Color`
        - **configured by default**
        - validate hexadecimal color with no transparency including leading hash char `#`

Features
--------

[](#features)

- always server side checked attributes `required`, `disabled` and `readonly`
- all HTML5 specific and global atributes (by [Mozilla Development Network Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference))
- every field has it's build-in specific validator described above
- every build-in validator adds form error (when necessary) into session and than all errors are displayed/rendered and cleared from session on error page, where user is redirected after submit
- any field is possible to render naturally or with custom template for specific field class/instance
- very extensible field classes - every field has public template methods:
    - `SetForm()` - called immediatelly after field instance is added into form instance
    - `PreDispatch()` - called immediatelly before any field instance rendering type
    - `Render()` - called on every instance in form instance rendering process
        - submethods: `RenderNaturally()`, `RenderTemplate()`, `RenderControl()`, `RenderLabel()` ...
    - `Submit()` - called on every instance when form is submitted

Examples
--------

[](#examples)

- [**Application - Questionnaires (mvccore/app-questionnaires)**](https://github.com/mvccore/app-questionnaires)

Basic Example
-------------

[](#basic-example)

```
$form = (new \MvcCore\Ext\Form($controller))->SetId('job_hunting');
...
$jobQual = new \MvcCore\Ext\Forms\Fields\Select;
$jobQual
	->SetName('job_qualification')
	->SetLabel('Job Qualificatio:')
	->SetOptions([
		'junior'	=> 'Junior Developer',
		'senior'	=> 'Senior developer',
		'manager'	=> 'IT Manager',
	]);
$gender = new \MvcCore\Ext\Forms\Fields\Radio([
	'name'		=> 'gender',
	'label'		=> 'Gender:',
	'options'	=> [
		'M'			=> 'Male',
		'F'			=> 'Female',
		'O'			=> 'Other',
	],
]);
$country = new \MvcCore\Ext\Forms\Fields\CountrySelect([
	'name'		=> 'country',
	'label'		=> 'Country:',
	'filter'	=> ['DE', 'AT', 'FR', 'NL'],
]);
$skills = new \MvcCore\Ext\Forms\Fields\CheckboxGroup([
	'name'		=> 'skills',
	'label'		=> 'I control programming languages:',
	'options'	=> [
		'html'		=> 'HTML5',
		'css'		=> 'CSS3',
		'js'		=> 'Javascript',
		'ts'		=> 'Typescript',
		'php'		=> 'PHP',
		'cs'		=> 'C#',
		'vb'		=> 'Visual Basic',
		'java'		=> 'Java',
		'py'		=> 'Python',
		'pl'		=> 'Perl',
	],
]);
$public = new \MvcCore\Ext\Forms\Fields\Checkbox([
	'name'		=> 'public',
	'label'		=> 'Yes, anybody could see my profile.',
	'checked'	=> TRUE,
]);
$color = new \MvcCore\Ext\Forms\Fields\Color([
	'name'		=> 'profile_color',
	'label'		=> 'My profile color:',
	'value'		=> '#0000FF',
]);

...
$form->AddFields($jobQual, $gender, $country, $skills, $public, $color);
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

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

Recently: every ~57 days

Total

30

Last Release

535d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a68d9cd696ed584a9ee742fa089d0650f4f7a95754bf5d9ee301e6c9013df3fd?d=identicon)[tomFlidr](/maintainers/tomFlidr)

---

Top Contributors

[![tomFlidr](https://avatars.githubusercontent.com/u/1833722?v=4)](https://github.com/tomFlidr "tomFlidr (113 commits)")

---

Tags

pluginframeworkHTML5colormvcextensionplug-ingroupsforminputselectcountryFormsswitchstatesextcheckboxcolorsinputscheckboxesradioradioButtonwebformmvccorecountirescountry selectselectscheckbox groupradios

### Embed Badge

![Health badge](/badges/mvccore-ext-form-field-selection/health.svg)

```
[![Health](https://phpackages.com/badges/mvccore-ext-form-field-selection/health.svg)](https://phpackages.com/packages/mvccore-ext-form-field-selection)
```

PHPackages © 2026

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