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

AbandonedArchivedKirby-plugin[Utility &amp; Helpers](/categories/utility)

microman/kirby-form-blocks
==========================

Contactform based on Kirby blocks.

2.0.4(3y ago)492.9k4MITPHP

Since Dec 5Pushed 3y ago5 watchersCompare

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

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

Kirby Form Block
================

[](#kirby-form-block)

Obsolete v2.0.4 -&gt; v3.0
--------------------------

[](#obsolete-v204---v30)

This plugin is no longer under maintenance!

Use new [Kirby Form Block Suite](https://github.com/youngcut/kirby-form-block-suite) with a lot of new features.

Overview
--------

[](#overview)

This form plugin for Kirby offers you maximum flexibility and usability. It can be used as a block anywhere you needed. Even multiple times per page.

Based on the great features of [Kirby 3.6](https://getkirby.com/releases/3.6).

[![Grid block](./.github/grid-form-block.gif)](./.github/grid-form-block.gif)

**Packed with a rich set of features:** 🎉

✅ Editors can flexibly organise the form fields.

✅ Spam protection with an integrated honeypot. (Since V2.0)

✅ Create a custom form field easely by added with just 2 files (Blueprint &amp; Template).

✅ A newly created form block will be automatically filled by default data from a JSON file (which you can copy from a existing form block).

✅ Incoming requests can be viewed and managed within the block. (optional)

✅ You and/or the visitors will receive an email on incoming requests. (If desired)

✅ Custom form data can be defined in the config file. (E.g. for using of the IP address, etc.).

✅ Language support for English and German. Messages are fully customizable/expandable for developers and/or editors.

Before we start
---------------

[](#before-we-start)

> Do you miss a feature? Post a feature request and [donate something](https://www.paypal.com/donate/?hosted_button_id=ZMV4BV3X7EUT4). I can't guarantee that your suggestion will make it into the next release.

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

[](#installation)

For use with Kirby 3.6+ only! ([update here!](https://github.com/getkirby/kirby)) Download and copy this repository to your plugin folder: `/site/plugins/`

**Composer**

`composer require microman/kirby-form-blocks`

Basic usage
-----------

[](#basic-usage)

Just put `form` in your fieldsets of your blocks field:

```
fields:
  my_block:
    type: blocks
    fieldsets:
      - form
      ...
```

If you're not familar with Kirbys blocks field [check this out](https://getkirby.com/docs/reference/panel/fields/blocks).

On the *blocks preview*, you can set the name of your form and also check, if there's new requests. Inside the blocks settings you have 3 tabs:

- *Inbox:* Shows you all requests. Set them to (un)read, delete it or change the view of the individual entries with placeholders. (Change display text)
- *Form fields* Manage the form fields that will displayed to the visitors. You can add more types of form fields. (more later)
- *Options* Sets the behavior on receipt of the request. Can be extended this with other fields

### Define default form block data

[](#define-default-form-block-data)

If your editor use more or less the same form multiple time, it can be usefull to set the default setting. To define the default form fields and form options follow these steps:

1. Create a form block
2. Fill it as desiered
3. Copy the form block
4. Paste it into ´site/config/formblock\_default.json´

> If your site is multilanguage, you can set a postfix behind the filename for each language on your site. (e.g `formblock_default_de.json`)

### Customize the Output

[](#customize-the-output)

Quick and easy: Copy `site/plugins/kirby-form-blocks/snippets/blocks/` to `site/snippets/blocks/` and edit the files.

### form field types

[](#form-field-types)

Following form field types are available by default:

NameOutput1input[![input](./.github/input.png)](./.github/input.png)2textarea[![textarea](./.github/textarea.png)](./.github/textarea.png)3select[![select](./.github/option.png)](./.github/option.png)4checkbox[![checkbox](./.github/check.png)](./.github/check.png)5radio[![radio](./.github/options.png)](./.github/options.png)**Add a custom form field types**

Let's say you want to create an form field that shows some information to your visitors:

*site/blueprints/blocks/formfields/info.yml*

```
name: Information
icon: alert

fields:
  title:
    type: text
    width: 1/2
  color:
    type: select
    width: 1/2
    options:
      green: Green
      orange: Orange
      red: Red
  info:
    label: form.block.fromfields.select.placeholder
    type: writer
```

*site/snippets/formfields/info.php*

```
