hksagentur / kirby-webform
Easily create and manage webforms in Kirby
Package info
github.com/hksagentur/kirby-webform
Type:kirby-plugin
pkg:composer/hksagentur/kirby-webform
3.0.0
2026-03-09 15:05 UTC
Requires
- php: >=8.1.0
- getkirby/cms: >=3.10 <6.0
- getkirby/composer-installer: ^1.2
Requires (Dev)
- laravel/pint: ^1.27
- phpmd/phpmd: ^2.15
- vimeo/psalm: ^6.15
Suggests
- ext-pdo: Support for storing submissions in databases
- ext-sodium: Support for encryption of field values
README
Easily create and manage webforms in Kirby, heavily inspired by Filament Forms.
Requirements
Kirby CMS (>=3.10)
PHP (>= 8.2)
Installation
Composer
composer require hksagentur/kirby-webform
Download
Download the project archive and copy the files to the plugin directory of your kirby installation. By default this directory is located at /site/plugins.
Configuration
Add a configuration file for a new form in site/forms.
<?php // site/forms/contact.php use Webform\Action\Email; use Webform\Form\Components\Button; use Webform\Form\Components\TextInput; use Webform\Form\Components\Textarea; use Webform\Form\Form; return Form::create()->children([ TextInput::create('name') ->required(), TextInput::create('email') ->required() ->email(), Textarea::create('message') ->required() ->maxLength(255) ->rows(8), Button::create('submit') ->action(fn (FormSubmission $submission) => Email::create('contact') ->subject('Contact Form') ->from('no-reply@example.com') ->to('info@example.org') ->execute($submission) ), ]);
FAQ
How can I customize the directory from which the form configuration is read?
You can provide a custom directory via Kirby’s `roots` structure. Open the `index.php` and adjust the initialization of the kirby core:<?php // index.php require __DIR__ . '/kirby/bootstrap.php'; $kirby = new Kirby([ 'roots' => [ 'webforms' => dirname(__DIR__) . '/site/webforms', ], ]); echo $kirby->render();
License
ISC License. Please see License File for more information.