#57

Product support

Get help in the plugin support forum.

Categories

  • Marketing
  • Social
  • Utility

Lightweight front-end contact form plugin. Inspired by another OctoberCMS plugin. It was made mainly for personal use, because the other plugin doesn't always suits my needs. You are always welcome to use it and feel free to give any suggestions or opinions about the plugin.

If you like the product please give a thumbs up!

Advantages

  • Translatable content
  • File upload for email attachments
  • Automatic reply option

Requirements

  • Ajax Framework must be included in your layout/page in order to handle form requests.
  • Configure your mail settings to make sure your server can send emails.

Optional

  • Translate plugin, if you want to include multilingual contents.
  • MailgunSubscribe, if you want to enable automatic subscribtion to maillist.
  • Setup reCaptcha in case you want to enable human verification test and protect your website from spam and abuse.

Authors

License

The MIT License (MIT)

Copyright (c) 2017 GrofGraf

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Settings

This plugin creates a Settings menu item, found by navigating to Settings > Marketing > Contact Form. This page allows the setting of captcha validation, confirmation message, input labels, button text or enabling file upload for attachments and auto-reply.

If Translate is enabled, auto-reply email, button text and labels are translatable.

Usage

You can put the contact form on any front-end page. Add the contactForm component to a page or layout.

The simplest way to add the contact form is to use the component's default partial and the {% component %} tag. Add it to a page or layout where you want to display the form:

{% component 'contactForm' %}

If the default partial is not suitable for your website, replace the component tag with custom code, for example:

<div class="confirm-contact-container">
</div>
<form id="contact-form"
  data-request="{{ __SELF__ }}::onMailSend"
  data-request-update="'{{ __SELF__ }}::confirm': '.confirm-contact-container'"
  {% if __SELF__.enableFileUpload %}
  data-request-files
  {% endif %}
  >
  <div class="form-group">
    <label for="name">
      {{label.name}}
    </label>
    <input type="text" name="name" class="form-control">
  </div>
  <div class="form-group">
    <label for="email">
      {{label.email}}
    </label>
    <input type="text" name="email" class="form-control">
  </div>
  {% if __SELF__.enableFileUpload %}
  <div class="form-group">
    <label for="attachment">{{label.attachment}}</label>
    <input type="file" name="attachment" class="form-control">
  </div>
  {% endif %}
  <div class="form-group">
    <label for="message">
      {{label.message}}
    </label>
    <textarea rows="5" name="message_content" class="form-control"></textarea>
  </div>
  {% if __SELF__.enableCaptcha %}
    <div class="form-group">
      <label for="g-recaptcha">
        {{label.captcha}}
      </label>
      <div class="g-recaptcha" data-sitekey="{{ __SELF__.captchaSiteKey }}"></div>
    </div>
  {% endif %}
  <button class="btn btn-primary btn-lg pull-right mt-4">
    {{label.button_text}}
  </button>
</form>

The example uses standard partial {{ __SELF__ }}::confirm for displaying the subscription confirmation message. Confirmation message will be displayed in .confirm-contact-container. The default partial located in plugins/grofgraf/contactme/components/contactform/confirm.htm.

Email templates for contact and auto-reply can be customized under Settings > Mail > Mail Templates

1.1.1.

Optional maillist subscribe consent field

Dec 15, 2017

1.1.0

Fixed permission

Dec 13, 2017

1.0.9

Registered permissions

Dec 13, 2017

1.0.8

Added variables to automatic reply email template

Dec 13, 2017

1.0.7

Added post() information to message and auto reply

Dec 11, 2017

1.0.6

Synchronized with latest MailgunSubscribe update

Dec 11, 2017

1.0.5

Customer name is posted to maillist

Dec 08, 2017

1.0.4

Auto subscribe error fixed

Dec 08, 2017

1.0.3

Component namespace error fixed

Dec 08, 2017

1.0.2

Captcha credentials can be empty if captcha not enabled

Dec 08, 2017

1.0.1

First version of ContactMe

Dec 05, 2017