Skip to main content

Configuration

The blueprint file is required for each email form and defines its settings, including fields and other options. It must be placed in site/blueprints/emails/.

Template Info

The Template Info section defines the basic information for the template. The type must always be set to managed-template to ensure the plugin recognizes it correctly. The name specifies the label displayed in the Kirby Panel dropdown and can be multilingual if your site supports multiple languages (e.g., using en and defor English and German).

type: managed-template
name:
  en: Contact Form
  de: Kontaktformular

Properties

Name Type Default Description
name string | array

Required, multilingual. Will be shown in panel select field

Anti-Spam

The form_submission section provides optional settings to prevent spam by defining time limits for form submissions.

By default, min_time is set to 3 seconds to ensure users spend some time on the form before submitting, while max_time is set to 7200 seconds (2 hours) to prevent overly delayed submissions. These values are suitable for most use cases and usually do not require adjustments.

If needed, you can customize these values to fit specific requirements.

formsubmission:
  mintime: 3            
  maxtime: 7200

Properties

Name Type Default Description
maxtime int 7200

Maximum time in seconds before form expires

mintime int 3

Minimum time in seconds before form can be submitted

Emails

In the email section, you configure the details for emails sent via the plugin. This includes settings for emails sent to site owners (receiver emails) and confirmation emails sent to form users. Additionally, you can define reusable text snippets for dynamic content in the email templates.

Example

emails:
  mail:
    subject: 'New Inquiry for :topic'
    sender: Contact Form
  reply:
    subject: Your Inquiry 
    sender: My Website
  content:
    greetings:
      en: Thank's for your inquiry 
      de: Vielen Dank für Ihre Anfrage

The content attribute footer is reserved by the panel.

Properties

Name Type Default Description
content array

Add reusable strings that can be used in email templates, such as greetings or custom text in multiple languages.

mail object

Configure the subject and sender for emails sent to the site owner. You can use :topic as a placeholder.

reply object

Define the subject and sender for confirmation emails sent to the form user.

Fields

Defines the form fields, including their type, label, validation, and other attributes.

fields:
  name:
    type: text
    label: 
      en: Name
      de: Name
    required: true
  email:
    type: email
    label: 
      en: Email Address
      de: E-Mail-Adresse
    required: true
  message:
    type: textarea
    label: 
      en: Message
      de: Nachricht
    required: true

Buttons

Defines the form buttons. This configuration is optional and allows you to customize button labels or disable the reset button.

buttons:
  send:
    label: Submit
  reset:
    show: false
    label: Reset