PHPackages                             mzur/kirby-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. mzur/kirby-form

ActiveKirby-plugin

mzur/kirby-form
===============

A form helper for Kirby-based websites, using the Post/Redirect/Get pattern.

v3.3.0(3y ago)869.6k—5.7%6[2 issues](https://github.com/mzur/kirby-form/issues)[1 PRs](https://github.com/mzur/kirby-form/pulls)1MITPHP

Since Jan 26Pushed 3y ago2 watchersCompare

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

READMEChangelog (10)Dependencies (5)Versions (27)Used By (1)

Kirby Form
==========

[](#kirby-form)

[![Tests](https://github.com/mzur/kirby-form/actions/workflows/php.yml/badge.svg)](https://github.com/mzur/kirby-form/actions/workflows/php.yml)

**This is a fork of [jevets\\kirby-form](https://github.com/jevets/kirby-form).**

A helper library for working with Kirby forms, using the [Post/Redirect/Get](https://en.wikipedia.org/wiki/Post/Redirect/Get) design pattern.

Quick Example
-------------

[](#quick-example)

```
$form = new Form([
    'name' => [
        'rules'     => ['required'],
        'message'   => ['Name is required']
    ],
    'phone' => [],
]);

if ($form->validates()) {
    // Validation passed
    // Do something with the data
}
```

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

[](#installation)

Install with composer:

```
# Kirby 2
composer require mzur/kirby-form:^1.0
# Kirby 3
composer require mzur/kirby-form:^2.0
```

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

[](#basic-example)

This example assumes you're using [page controllers in Kirby](http://getkirby.com/docs/templates/controllers) and that your page's URI is `/my-page`.

```
// site/templates/my-page.php
