Product support

Visit this product's website for support.


This is a simple but flexible contact form builder that supports translation.

It allows you to create your own (contact) form with custom fields and rules.

All sent data are stored in Messages list.

Admins can be notified of sent form by email, visitors can receive auto reply message.

It also contains passive antispam control (filter about 80% of spam), active antispam with Google reCAPTCHA and IP address protection (limit submits from one address during a day).

Functions overview

  • AJAX enabled form that works even when JavaScript is disabled in visitor's browser
  • custom fields with own type, label, CSS classes, order and validation
  • necessary JS and CSS can be automatically injected if you need to start quick
  • translation support with Rainlab Translate
  • passive antispam based on checking form sendind time and spam field content
  • active antispam with Google reCAPTCHA with locale detection support
  • IP address protection limits form submits from one address during a day
  • store sent data in Messages list, read/unread state and preview of sent data
  • auto reply and notification emails
  • dashboard widgets: Messages stats and New messages
  • little hacks for advanced users to allow multiple forms
Basic form

Small Contact form

Simple but flexible contact form builder with custom fields, validation and passive antispam.


GitHub clone into /plugins dir:

git clone https://github.com/jan-vince/smallcontactform

OctoberCMS backend

Just look for 'Small Contact Form' in search field in:

Settings > Updates & Plugins > Install plugins


Settings > Administrators

You can set permissions to restrict access to Settings > Small plugins > Contact form and to messages list.

Installation with composer

  • Edit composer.json by adding new repository
    "repositories": [
      "type": "vcs",
      "url": "https://github.com/jan-vince/smallcontactform"
  • run in command line
    composer require janvince/smallcontactform

Setup new Contact form

Settings > Small Contact form


  • You can set your own CSS class name and general success/error messages.
  • If you need it, placeholders can be used instead of labels
  • Form can be hidden after successful submit.

Enable AJAX

By default, sending form will trigger page reload. With AJAX, everything can be done without page reloading which will be more user friendly.
If user's browser doesn't support (or has disabled) JavaScript, form will still work with page reloads after send.

  • For AJAX enabled form, before send confirmation dialog can be required.

Add Assets

If you want to start quickly, you can enable Add assets checkbox - and then Add CSS and JS assets.
This will include necessary styles (Bootstrap, AJAX, October AJAX) and scripts (jQuery, Bootstrap, October AJAX framework and extras).

But you have to include Twig tags {% styles %} and {% scripts %} into your layout or page like this:

        {% styles %}

    {% page %}

    {% scripts %}



If you want to insert assets by hand, you can do it this way (or similar):

        <link href="{{['~/modules/system/assets/css/framework.extras.css']|theme }}.css" rel="stylesheet">

    {% page %}

    <script type="text/javascript" src="{{ [




  • You can set button class and text.
  • Form can automatically redirect to given URL after successful submit.


Here you can add fields to build your contact (or other) form.

The idea is simple (and solution is so I hope):

  • Click to add new field
    • Set it's name (this is used for &lt;input name=&quot;{{name}}&quot; id=&quot;{{name}}&quot;&gt;), so it should be lowercase without special characters.
    • Set Label if you need one (it is used for descriptive text above input field)
    • Set autofocus if you want cursor to automatically jump to this field (if checked more than one field, cursor jumps to first one)

When dropdown is selected there will be values/options repeater shown. You can add as many values you need.

Hint: you can add dropdown empty option by adding a value with empty ID.

Field data validation

You can select from predefined rules or add custom Validator rules (read documentation).

Some rules require additional validation pattern some of them not.

  • You can add one or more validation rules and error messages for them
  • Error messages will be shown above input field
  • You can reorder fields by drag and drop left circle (all fields can be collapsed by pressing Ctrl+click (Cmd+click on MacOS) on arrow in right top corners)

Hint: For dropdown validation you can use custom validation type with rule in and list of IDs in pattern field (eg: 1,2,3).


System writes all form data in database, but for quick overview Name, Email and Message columns are visible separately in Messages list.

But you have to help system to identify these columns by mapping to your form fields.

These mappings are also used for autoreply emails where at least Email field mapping is important.


Passive antispam

Very simple implementation of passive antispam (inspired by Nette AntiSpam Control).

The idea behind this is to check how fast is form send and if robots-catching field is filled.

  • When allowed, you can set form delay (in seconds) to prevent too fast form sending (mostly by robots). You can add custom error message (will be shown in general error message box above form).
  • You can add antispam field label and error message for non JavaScript enabled browsers.
    • If JavaScript is working, antispam field is automatically hidden and cleared.

Google reCaptcha

Implementation of Google reCaptcha antispam protection.


First you have to create new API keys pair in reCaptcha admin panel.

Hit Get reCAPTCHA button on reCaptcha wellcome page. Set label and check reCAPTCHA v2 option and hit button Register.

Copy Site key and Secret key to Contact Form's settings fields.

If you want Contact Form to automatically include server scripts in your layout, check the button in Form settings.

Check sender's IP

You can add an extra form protection with limit submits from one IP address.

This check has own error message and custom field to set maximum submits.


Mails can be sent directly or queued (OctoberCMS queue must be configured!).

Don't forget to configure mail preferences in Settings > Mail > Mail configuration!

Data in email templates

There are variables available in all email templates:

  • fields is array of [ 'field name' => 'post value' ]
  • fieldsDetails is array of [ 'field name' => ['name', 'value', 'type', ...] ]

Allow autoreply

Email can be send to form sender as confirmation.

  • You have to enter email address and name - it will be used as FROM field
  • Email subject can be manually added here (or edited in Settings > Mail > Mail templates (code: janvince.smallcontactform::mail.autoreply))
  • Email TO address and name have to be assigned to form fields (in selections only corresponding field types are shown - if you don't see one, try to check it's type in Fields tab)
    • Message field can be also assigned (and will be saved separately into database)

Allow notifications

Once a Contact form is sent a notification can be immediately send to a provided email address (or comma-separated list of addresses).

A Reply to address of notification email will be set to an email address from Contact form (if this field is used).

You can also force From address to be set to the one entered in Contact form - but not all email systems support this!


You can allow translation with RainLab Translate plugin.

After installation of Translate plugin, please add at least two languages in Settings > Translate > Manage languages. For translations to work there must be a localePicker component included in your layout/page.

Form texts

Most of Small Contact form texts can be edited right in Settings > Small plugins > Contact form.

Custom form fields

Translate plugin doesn't supports translation of individual repeater fields yet, so form field texts (label, validation error messages) have to be - for now - translated in a dictionary: Settings > Translate > Translate messages

Please note that form fields labels will be shown in dictionary after first form render (on your frontend page) and validation error messages after first send.

Email templates

You can create your own email templates in Settings > Mail > Mail templates (for hint look inside of default templates starting with janvince.smallcontactform::).

Remember your email templates CODE and put in in Small Contact form email settings in Settings > Small plugins > Contact form > Email tab. For each language there can be specific template.

There is {{fields}} array available inside of email templates.

If your custom form field has name eg. 'email', you use it in template with {{fields.email}}.


All sent data from Contact form are saved and listed in backend Messages list.

If email, name and message fields are assigned on Settings > Small plugins > contact form > Columns mapping tab, they will be saved and shown in separate columns.

You can click on a record to see all form data. The message will be marked as read.


There are available report widgets to be used on OctoberCMS dashboard.

Messages stats

Shows basic messages statistics.

New messages

Shows number of new messages. The color changes to green if there are any.

You can simply click widget to open Messages list.

Hacking a form component

Sometimes there is a need to have more than one contact form. As this plugin is meant to be as simple as possible, these multiform functions are little hacks :)

Set form description

You can add a form description. This can be used to distinquish between more forms or to add extra info to sent form data.

Form description is saved to Messages list and there is a separate column (invisible by default).

There is also an Alias column that contain component's alias of the used form.

[contactForm myForm]
form_description = 'Form used in home page'

You can override form's property in Twig component tag:

{% component 'myForm' form_description = 'My other description' %}

This can be more complex:

{% set myVar = 12345 %}
{% component 'myForm' form_description = ('Current value: ' ~ myVar) %}

In email template you can access these variables like this:

Form alias: {{fields.form_alias}}
Form description: {{fields.form_description}}

When you override form description in {% component form_description = 'My description' %}, description will be added as a hidden field into a form. Do not use this to store private data as this is easily visible in page HTML code!

Override notification email options

You can set different email address to which notification about Contact Form sent will be delivered and also change a notification template.

Template must exist in Settings > Mail > Mail configuration.

If you add a locale string to notification_template property (like notification_template_en) than that one has priority and will be used if App::getLocale() returns en.

[contactForm salesForm]
notification_address_to = 'sales@domain.com'
notification_template = 'notification-sales'
notification_template_en = 'notification-sales-en'
notification_template_cs = 'notification-sales-cs

Override autoreply email options

You can set different email address and name for autoreply message and also use different autoreply template.

Template must exist in Settings > Mail > Mail configuration.

If you add a locale string to autoreply_template or autoreply_address_from_name property (like autoreply_template_en or autoreply_address_from_name_en) than that one has priority and will be used if App::getLocale() returns en.

[contactForm orderForm]
autoreply_address_from = 'order@domain.com'
autoreply_address_from_name = 'Orders'
autoreply_address_from_name_en = 'Orders'
autoreply_address_from_name_cs = 'Objednávky'
autoreply_template = 'autoreply-order'
autoreply_template_en = 'autoreply-order-en'
autoreply_template_cs = 'autoreply-order-cs'

Disable some form fields

You can disable some of defined form fields by passing their names in disable_fields component property.

Several fields can be added while separated with pipe |.

disable_fields = 'phone|name|confirmation'

Or you can disable some of functions:

disable_notifications = true


Add an empty option to dropdown field

You can easily add an empty option with empty ID and some value.

Dropdown empty field

Validate dropdown field

If you want to validate dropdown options, you can use custom validation rule in with list of IDs as a validation pattern.

Dropdown validation

My thanks goes to:
OctoberCMS team members and supporters for this great system.
Andrew Measham for his photo.
Font Awesome for nice icons.

Created by Jan Vince, freelance web designer from Czech Republic.

  • Found the plugin useful on 11 Oct, 2019

    Hello, I worked on localhost I added some fields and after I put the changes on the dev the form doesn't have the fields anymore. how can I keep the fields fields?

  • author

    Replied on 11 Oct, 2019

    Hi Alex,

    Contact Form configuration is saved in the database, so you have to upload it (or at least changed parts).

    If you need more help, you can open an issue on GitHub.

    Best regards,


  • Found the plugin useful on 20 Sep, 2019

    Works perfectly and lots of customable options.

    Only one minor issue I stumbled upon: when I enable Google reCaptcha, by default the Google Checkbox reCaptcha is used. How can I edit the template to use the Invisible Google reCaptcha?

  • author

    Replied on 21 Sep, 2019

    Hi and thank you!

    Plugin currently supports only classic reCaptcha, but I will add to my todo list to add also invisible.

    If you want to speed it up, you can create issue on GitHub and maybe help with PR.

    Best regards,


  • Found the plugin useful on 28 Jun, 2019

    Works perfectly with the flexibility of doing lots of customizations! Thanks a lot!

  • Found the plugin useful on 2 Feb, 2019

    Hey, I was wondering if you could add the option to add placeholders for your fields? Otherwise great plugin!

  • author

    Replied on 2 Feb, 2019

    Hi Lukas, you can enable placeholders in pugin settings and they will be used instead of labels.

  • Found the plugin useful on 4 Oct, 2018

    Great plugin and easy to use. It just has everything I need to create a simple contact form. Thank you.

    A minor thing is that the custom error message for field validation doesn't not show up. In the tooltip that seems it is still using the default error message.

  • author

    Replied on 5 Oct, 2018

    Thank you!

    And please feel free to open new issue on GitHub so we can solve your problem!

    Best regards,

  • Found the plugin useful on 27 Aug, 2018

    Thanks for a great plugin.

  • author

    Replied on 27 Aug, 2018

    You're welcome :)

  • Found the plugin useful on 23 Jul, 2018

    I really love your plugin, very neat and clean yet very configurable. But I get this error, "Connection could not be established with host smtp.mailgun.org [Connection timed out #110]" on line 269 of /homepages/38/d741803717/htdocs/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php

    I'm still learning on how to be on github, please be patient with me :( And I know this is spoonfeed but if you don't mind helping me, you can contact me on chiwawa_lee1@yahoo.com

    Thank you very much!

  • author

    Replied on 23 Jul, 2018

    Hi and thanks!

    Your problem is probably in mail configuration of your October installation. I will send you some info in your email.

  • Found the plugin useful on 20 Jul, 2018

    How to add multiple email address for notification?

  • author

    Replied on 23 Jul, 2018

    Hi and thanks for the review!

    I have added the option for several notification email addresses in a 1.16 version. You can update now and test it. But please use GitHub for issues.

  • Found the plugin useful on 30 Jun, 2018

    Hi. Thanks for a great plugin.

    I am only having a small problem. If I send my form (no matter if via ajax or the normal way) and then simply refresh the page the error messages are still visible. Why is this happening?

    Thanks, Andriy

  • author

    Replied on 9 Jul, 2018

    Hi Andriy and thanks!

    I will look at the flash messages problem and send answer to your GitHub issue.

  • Found the plugin useful on 6 May, 2018

    Works good once I figured out how to get the Drivers plugin to upgrade Guzzle to 6.3.3 to get rid of the error under PHP 7.2: when sending Mails via Mailgun.

    Thank you for this plugin. It will save me a lot of time and is flexible enough to use out of the box.

    P.S. I posted an issue on github to help others fix the Mailgun Error on PHP 7.2

  • author

    Replied on 7 May, 2018

    Hi Kurt and thanks!

  • Found the plugin useful on 10 Jan, 2018

    Excellent work!

  • author

    Replied on 10 Jan, 2018

    Thank you!

  • Found the plugin useful on 20 Dec, 2017

    Great plugin, works with absolutely minimum configuration. Big plus is the fact that you can wrap some css around it immediately minimizing the actual dive into the code itself, perfect for small projects where the design is not so much important but merely the functionality.

  • author

    Replied on 21 Dec, 2017

    Hi and thanks! :)

  • Found the plugin useful on 19 Oct, 2017


    Please tell me how can I use this plugin on 2 pages of the site?

    I do not see the second page when I use this plugin on two separate pages of the site.

  • author

    Replied on 19 Oct, 2017


    can we move this to GitHub issues? Reviews are not good place for discussion.

    I am using Contact form on several pages in my projects so we should be able to solve your problem.

  • Found the plugin useful on 17 Aug, 2017

    Site users can not send the messages through the contact form.

    Please help me!

  • author

    Replied on 17 Aug, 2017

    can you please open an issue on GitHub?

    Reviews are not a good place to discuss problems.

    Thank you,

  • Found the plugin useful on 14 Aug, 2017

    Excellent work! This seems like it is the only actual active contact form plugin on OctoberCMS. I'll probably be switching over all of my projects to it!

    One request, could you allow for multiple templates? E.g. we have a general sales "contact" form (that sends to sales@companyname.com) and we have a "support" form (that sends to support@companyname.com). It seems this plugin only allows for one form unless I am mistaken?

    Thanks so much for your hard work! Please don't vanish like the other contact form devs :)

  • author

    Replied on 14 Aug, 2017

    Hi Alex and thanks for your review!

    This was supposed to be a simple plugin, so only one instance/setup is possible for one OctoberCMS installation. But maybe there are some ways.

    Please open a GitHub issue for this so we can discuss how I can help you.

  • Found the plugin useful on 13 Aug, 2017

    Slow sending, but it works. Thank you! Please add reCaptcha support.

  • author

    Replied on 13 Aug, 2017

    Hi @zooks and thanks for review!

    You can maybe open an issue on GitHub and write more details about the slowness as I have never experienced it.

  • Found the plugin useful on 28 Jun, 2017

    The only form plugin who allow a to translate form fields.

    It's higthly configurable...

  • author

    Replied on 5 Oct, 2017

    Thanks! :)


Fixed reCaptcha checkbox version not showing up on older installations

Oct 10, 2019


Fixed AJAX redirect when validation error (thanks zlobec)

Oct 06, 2019


Fixed reCaptcha scripts load

Oct 06, 2019


Added invisible reCaptcha

Oct 06, 2019


Added polish (thanks Magiczne) and spanish (thanks codibit) translations

Sep 16, 2019


Added option to set custom reCaptcha wrapper CSS class

Mar 30, 2019


When placeholders are used, labels are now still present and only hidden by style attribute

Feb 13, 2019


Fixed multiple flash messages shown

Feb 13, 2019


Form fields repeater is not translatable

Feb 05, 2019


Added dropdown field type

Nov 29, 2018


Added custom validation fields (thanks petr-vytlacil for help)

Nov 29, 2018


Added French translations (thx FelixINX)

Nov 06, 2018


Added Slovak translation (thx vosco88)

Oct 22, 2018


Fixed checkbox validation and validation state

Sep 05, 2018


Updated hungarian translation (thx gergo85)

Aug 08, 2018


Fixed missing form data in autoreply templates. Updated default autoreply messages.

Aug 06, 2018


Added option to have more than one notification email address

Jul 23, 2018


Allowed combination of disabled messages saving and allowed passive antispam

Jul 19, 2018


Fixed default values for recaptcha settings to false

Jul 17, 2018


Fixed settings fields trigger

Jun 05, 2018


Added Privacy tab and new option to disable sent messages saving

Jun 05, 2018


Added option to export messages list

Apr 23, 2018


Disabled placeholder attribute for checkbox

Apr 11, 2018


Added form_alias and form_description variables to email (notification and autoreply) templates

Mar 26, 2018


Chanded input custom list column type for switch to prevent interaction with toolbar JS

Mar 05, 2018


Added Russian translation (thank Dinver)

Feb 20, 2018


Added form description field to message preview

Feb 15, 2018


Added form fields alias and description (can be used to distinquish between more forms or to save extra data). More info in README file.

Feb 15, 2018


Added form componnet hacks group (now only for disabling notification emails, more will come)

Feb 14, 2018


Fixed label 'for' attribute to point to input ID (as required by specification)

Feb 12, 2018


Fix problem when ReCaptcha field was logged as an undefined field to system log (thx LukeTowers)

Feb 11, 2018


REPLY TO address is now used for notification email by default. You can still force FROM address to be used (but this is not supported by all email systems!).

Feb 09, 2018


Form registered as Page snippet to be used in Rainlab.Page content (thx BtzLeon)

Feb 09, 2018


Added option to disable built-in browser form validation. Added class 'is-invalid' for fields with error (as used Bootstrap 4).

Feb 06, 2018


Changed count() to mb_strlen() function in custom list type definition

Feb 06, 2018


Fixed 'text_preview' list field type truncate function (thx kuzyk)

Feb 01, 2018


Added option to specify <label> custom CSS class

Feb 01, 2018


Removed reCAPTCHA hard coded locale string (thx kuzyk). Added settings option to allow locale detection.

Jan 10, 2018


Changed All messages large indicator to New messages in scoreboard

Jan 08, 2018


Added Google reCAPTCHA validation

Jan 08, 2018


Added direct link to messages list from dashboard widget

Jan 08, 2018


Fixed typo in lang files

Dec 22, 2017


Added component alias to id attributes for multi-form usage

Nov 30, 2017


Removed value attribute in textarea field

Nov 30, 2017


Changed JSON type for repeater DB column

Sep 17, 2017


Added option to mark selected messages as read

Sep 15, 2017


Added option for notification emails to have FROM address set from contact form email field

Aug 25, 2017


Fixed flash error for IP protection visibility

Aug 24, 2017


Fixed flash message visibility when where are some errors

Aug 24, 2017


Added some component hacking options (override autoreply and notification emails and template, disable fields)

Aug 24, 2017


Added "fieldsDetails" array to all email templates to have access to field labels, types and more

Aug 14, 2017


Fidex typo in lang filename

Jul 12, 2017


Added scoreboard button to quickly open form settings

Jul 11, 2017


Changes to allow multiple use of contact form (form and message blocks has now unique IDs)

Jul 11, 2017


Removed hardcoded date format for created_at column in messages list, updated README and added hungarian language (thanks Szabó Gergő for all this)

Jul 07, 2017


Removed field type restriction for Fields mapping

Jun 22, 2017


Fixed email template check

Jun 14, 2017


Fixed array of enabledLocales

Jun 14, 2017


Fixed translation of mail templates description in Settings > Mail templates

Jun 02, 2017


Added support for default translated mail templates (Czech and English for now)

Jun 02, 2017


Minor UI fix (thanks Szabó Gergő)

Jun 02, 2017


Added redirect option after successful submit (internal and external URL)

Jun 01, 2017


Added custom send button wrapper class

May 30, 2017


Added default value for getTranslated() method

May 26, 2017


Added translation support for Rainlab Translate plugin

May 26, 2017


Added option to use placeholders instead of labels

May 25, 2017


Changed remote_ip column type to string

May 25, 2017


Fixed IP protection error message

May 24, 2017


Added IP protection function (limit too many submits from one IP address)

May 24, 2017


Updated README.md with assets usage example

May 21, 2017


Fields mapping moved to separate tab *Columns mapping*

May 21, 2017


Mail templates convert new lines to <br> with {{ values|raw|nl2br }}

May 19, 2017


Mail templates now render values with {{ values|raw }}

May 19, 2017


Added dashboard report widgets (Stats and New messages)

May 19, 2017


Added function to delete records in Messages list

May 19, 2017


Fix some typos and add LICENCE file (thank to Szabó Gergő)

May 19, 2017


Fix form hiding after successful send

May 19, 2017


First version of Small Contact Form plugin

May 18, 2017