Kirby Uniform Documentation
A versatile Kirby 2 plugin to handle web form actions.
Builtin actions:
- Email: Send the form data by email.
- EmailSelect: Choose from multiple recipients to send the form data by email.
- Log: Log the form data to a file.
- Login: Log in to the Kirby frontend.
- SessionStore: Store the form in the user's session.
- Upload: Handle file uploads.
- Webhook: Send the form data as an HTTP request to a webhook.
Installation
Uniform requires PHP 5.6 or higher. It is highly recommended to use a version under active support.
Kirby CLI
Get the Kirby CLI and run kirby plugin:install mzur/kirby-uniform
.
Traditional
Download the repository and extract it to site/plugins/uniform
.
Composer
Run composer require mzur/kirby-uniform:^3.0
. Then create the file site/plugins/autoload.php
with the content:
<?php
require kirby()->roots()->index().DS.'vendor'.DS.'autoload.php';
Be sure to include the new vendor
directory in your deployment.
Setup
Add this to your CSS:
.uniform__potty {
position: absolute;
left: -9999px;
}
If you have a single language site you can choose the language Uniform should use in site/config/config.php
(default is en
):
c::set('uniform.language', 'de');
See here for all supported languages.
Note
Disable the Kirby cache for pages where you use Uniform to make sure the form is generated dynamically.
Note
Uniform makes use of Kirby sessions and the CSRF helper. This requires a session cookie to be set.
Questions
See the answers, post an issue if you think it is a bug or create a topic in the forum if you need help (be sure to use the uniform
tag or mention @mzur
).