PHPackages                             meraki/schema-html - 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. meraki/schema-html

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

meraki/schema-html
==================

Render a meraki/schema as an HTML form.

v0.2.1(2w ago)036↓76.7%MITPHPPHP ^8.4

Since Jun 4Pushed 2w agoCompare

[ Source](https://github.com/merakiframework/schema-html)[ Packagist](https://packagist.org/packages/meraki/schema-html)[ RSS](/packages/meraki-schema-html/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (6)Versions (4)Used By (0)

meraki/schema-html
==================

[](#merakischema-html)

Render a [`meraki/schema`](https://github.com/merakiframework/schema) as an HTML form.

Keeps HTML/form-rendering concerns out of the core schema domain. Reads only `meraki/schema`'s public API.

Usage
-----

[](#usage)

```
use Meraki\Schema\Facade;
use Meraki\Schema\Html\FormRenderer;
use Meraki\Schema\Html\FormOptions;

$schema = new Facade('signup');
$schema->addNameField('full_name')->minLengthOf(1)->maxLengthOf(255);
$schema->addEmailAddressField('email');
$schema->addBooleanField('subscribe')->makeOptional();

// Optional: configure the form + per-field UI
$options = (new FormOptions($schema))->postTo('/signup');
$options->pickField('email')->label('Your email address');

$html = (new FormRenderer($options->toArray()))->render($schema);
```

Render after validation to surface inline error messages:

```
$schema->validate($input);
echo (new FormRenderer($options->toArray()))->render($schema);
```

Form options
------------

[](#form-options)

`FormOptions` is a fluent builder producing the array the renderer consumes:

- `postTo($url)` / `getFrom($url)` — form method + action.
- `pickField($name)` → `FieldOptions`: `label()`, `renderAs(Renderer)`, `renderAsDropdown()`, `renderAsTextarea()`, `readonly()`, `disabled()`, `hidden()`, `withOption($value, $label)` (Enum), and `pickField()` for composite sub-fields.

`Renderer` enumerates the allowed input renderers and validates them per field type via `Renderer::validFor($field)`.

Elements are built with a small internal `Element` class that maps native PHP attribute values to HTML — `true` → bare attribute, `false`/`null` → omitted, scalars → escaped `name="value"`.

Request input
-------------

[](#request-input)

`Input` normalizes request data so it can be fed straight back to the schema, smoothing over PHP's quirks:

- a present-but-unfilled field arrives as `''` → normalized to `null` (presence is still recoverable via `has()`);
- a checked checkbox submits `'on'` → normalized to `true`;
- uploaded files are merged in by input name as `{ name, type, size }` metadata (ready for the `File` field);
- nested names like `price[amount]` are accessible via chained `get()`, `ArrayAccess`, or object access.

```
use Meraki\Schema\Html\Input;

$input = Input::fromGlobals();                 // $_POST + $_FILES
$input = Input::fromPsrRequest($request);      // PSR-7 parsed body + uploads
$input = new Input([...]);                     // already-merged array (tests)

$input->get('email');                          // null if absent or empty
$input->get('subscribe', false);              // true when checked
$input->get('price', [])->get('amount');      // chained nested access
$input->has('email');                          // presence (true even if empty)

$result = $schema->validate($input->toArray());
```

`Input` is read-only.

Local development
-----------------

[](#local-development)

`composer.json` links the sibling `../schema` checkout via a Composer path repository.

```
composer install
composer test

```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance96

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Total

3

Last Release

20d ago

### Community

Maintainers

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

---

Top Contributors

[![nbish11](https://avatars.githubusercontent.com/u/1518821?v=4)](https://github.com/nbish11 "nbish11 (22 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/meraki-schema-html/health.svg)

```
[![Health](https://phpackages.com/badges/meraki-schema-html/health.svg)](https://phpackages.com/packages/meraki-schema-html)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k543.5M2.7k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k46](/packages/neuron-core-neuron-ai)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[anthropic-ai/sdk

Anthropic PHP SDK

163583.3k20](/packages/anthropic-ai-sdk)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

36789.4k2](/packages/telnyx-telnyx-php)[oat-sa/tao-core

TAO core extension

65143.7k124](/packages/oat-sa-tao-core)

PHPackages © 2026

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