PHPackages                             denis303/codeigniter4-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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. denis303/codeigniter4-form

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

denis303/codeigniter4-form
==========================

31.4k↑900%1PHP

Since Mar 14Pushed 6y ago2 watchersCompare

[ Source](https://github.com/denis303/codeigniter4-form)[ Packagist](https://packagist.org/packages/denis303/codeigniter4-form)[ RSS](/packages/denis303-codeigniter4-form/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

CodeIgniter 4 Active Form
=========================

[](#codeigniter-4-active-form)

Usage
-----

[](#usage)

```
$form = new Form($model, $errors);

echo $form->open();
echo $form->inputGroup($data, 'name', ['id' => 'myinput'], ['label' => 'Custom Label']);
echo $form->renderErrors();
echo $form->beginButtons();
echo $form->submitButton('Submit');
echo $form->endButtons();
echo $form->close();

```

Generated HTML Code:

```

        Category

    The My Field field is required.

```

### Labels

[](#labels)

You can specify the field names in the model.

```
class MyModel extends \CodeIgniter\Model
{

    protected $validationRules = [
        'my_input' => [
            'rules' => 'required',
            'label' => 'My Field'
        ]
    ];

}

```

You can use all types of input from the form helper of the framework.

Function names and parameters are similar to those used in the framework.

```
$form->passwordGroup($data, 'name', $attributes, $groupAttributes);
$form->checkboxGroup($data, 'name', $attributes, $groupAttributes);
$form->textareaGroup($data, 'name', $attributes, $groupAttributes);

and all other...

```

You can also use simple functions to generate a single input.

```
$form->input($data, 'name', $attributes);
$form->password($data, 'name', $attributes);
$form->checkbox($data, 'name', $attributes);
$form->textarea($data, 'name', $attributes);

and all other...

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/57e1202e5b16f400586ffeeb19d75d18c44488eb824d4a958b541ecd73ad25dd?d=identicon)[denis303](/maintainers/denis303)

---

Top Contributors

[![denis303](https://avatars.githubusercontent.com/u/55409598?v=4)](https://github.com/denis303 "denis303 (1 commits)")

### Embed Badge

![Health badge](/badges/denis303-codeigniter4-form/health.svg)

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

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

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