34

Product support

Visit this product's website for support.

Categories

About

The most flexible, extensible, powerful, and easiest to use frontend form building & managing plugin available for OctoberCMS.

BLACK FRIDAY SALE!!!: From now until December 3rd, get 50% off with the code BLACKFRIYAY

All the Tools You Need to Build Powerful Forms

Loaded with lots of time-saving functionality, Easy Forms is the only OctoberCMS form management plugin you will ever need! Build and publish forms for the frontend in just minutes with the same ease as if you were building forms for the backend.

IMPORTANT: Get this plugin quick! Once the visual form builder is implemented in a future update the price will double to $100! Lock in your license now for half price!

The full power and flexibility of October's backend forms are now available in the frontend with ease!

If you've ever been forced to use WordPress for a client site (shudders), you may have heard of or used Gravity Forms. This plugin is conceptually very similar to the user experience of Gravity Forms while retaining the excellent developer experience that OctoberCMS provides.

NOTE: Support is provided on a private GitHub repository, contact me @LukeTowers on the October slack or @TheLukeTowers on Twitter with your OctoberCMS marketplace username and GitHub username to be added to the repo.

Installation

To install from the Marketplace, click on the "Add to Project" button and then select the project you wish to add it to and pay for the plugin. Once the plugin has been added to the project, go to the backend and check for updates to pull in the plugin.

To install from the backend, go to Settings -> Updates & Plugins -> Install Plugins and then search for LukeTowers.EasyForms.

Frontend display of volunteer application form

Forms

Forms are setup in the backend (https://example.com/backend/luketowers/easyforms/forms/) where you can specify the form fields (using the same backend form fields syntax you're used to), the confirmation (message / page that the user sees after submitting the form), and any notifications that should be triggered by the form being submitted.

NOTE: Right now a code editor is used to define the form fields using the backend forms YAML syntax, however a future version will utilize the visual FormBuilder component from the RainLab.Builder for a more user-friendly experience.

In addition to every single field type and field properties supported by OctoberCMS in the backend (as well as any that have been added to your specific OctoberCMS instance by other plugins), this plugin also adds support for a validation property that can be defined on any field to apply server side validation rules against that field. All validation error messages are user friendly.

NOTE: A future update will add support for inline field validation error messages.

Confirmations

After the form has been successfully submitted, the form's confirmation will be shown to the user. You can either specify a Message confirmation, which will replace the form with the provided message when the form has been successfully submitted or you can specify a URL confirmation that will redirect the user to the provided URL after the form has been successfully submitted.

NOTE: A future update will add support for conditional logic to be able to choose between multiple confirmations based on the data submitted in the form and other factors.

Notification Emails

After the form has been successfully submitted, any active notifications attached to the form will be fired. A number of variables are available to be used within the settings of the notifications and the content of the emails that are sent:

Variable Type Value
entry LukeTowers\EasyForms\Models\Entry The populated Entry model for the form submission
ip_address string The IP address of the user submitting the form
user_agent string The User-Agent of the user submitting the form
source_url string The URL that the form is being submitted on
form_title string The title of the form that is being submitted
fields array Array of flattened field names that were submitted. Array values are the value of the field. To access the value of the address field, you would use {{ fields.address.line_1 }}
field_config array Array with the names of flattened fields (nested fields or fields using the array syntax are available using the dot syntax instead here, i.e. address[line_1] becomes address.line_1) as the keys and their configuration as array values. value is also added to the field containing the value that was submitted for that field in the submission. To access the value of the address field, you would use {{ field_config.address.line_1.value }}
settings array Any settings set on the form object
all_fields string Rendered version of $/luketowers/easyform/components/partials/all_fields.htm, simplistic display of all submitted fields and their values. Generally best used in an email HTML body.

Twig can be used in the notification settings fields and in the body of the email.

Events

Event Parameters Description
luketowers.easyforms.notification.beforeSend (LukeTowers\EasyForms\Models\Notification) $notification, (array) &$vars, (array) &$data, (array) &$files Fired immediately before each notification is sent. Allows modification of the variables passed to the event and the ability to provide files to be attached to the message (files can be specified by adding their local path as an array key and their attach options as the value in the $files array).

Component: Easy Form (easyForm)

Purpose

Displays a form in the frontend.

Configuration:

Property Inspector Name Description
form Form The code of the form to display
displayTitle Display title Whether or not to display the title of the form when rendering it

Component properties

Variable Type Description
__SELF__.backendController LukeTowers\EasyForms\Controllers\Entries The backend controller instance used to generate and handle the displayed form
__SELF__.form LukeTowers\EasyForms\Models\Form The currently selected Form record that is being displayed

Default output

The default component partial outputs a form with the class easyform-container that applies all form styling in a scoped manner to prevent interference with your theme:

{{ form_ajax(__SELF__ ~ '::onSave', {'class': 'easyform-container', 'id': __SELF__}) }}

    <div class="layout-row">
        {% if __SELF__.property('displayTitle') %}
            <div class="field-section form-title">
                <h4>{{ __SELF__.form.name }}</h4>
            </div>
        {% endif %}
        {{ __SELF__.backendController.formRender() | raw }}
    </div>

    <div class="form-buttons">
        <div class="loading-indicator-container">
            <button
                type="submit"
                data-request="{{ __SELF__ ~ '::onSave' }}"
                data-hotkey="ctrl+s, cmd+s"
                data-load-indicator="Submitting"
                class="btn btn-primary">
                Submit
            </button>
        </div>
    </div>

{{ form_close() }}

Overriding either the default partial for your specific use case is easy by following the OctoberCMS documentation.

1.0.2

Various bug fixes, automatically generate a default confirmation & notification if none is provided when a form is created

Nov 27, 2019

1.0.1

Initialize plugin.

Nov 25, 2019