The forms plugin utilizes Attributize and Conditions to create custom forms for frontend and backend use.
- Redirect after submission
- Save entries to the database
- Automatically purge saved entries
- Throttle frontend entry creation via Laravel Rate Limiting
- Send entry notifications via the RainLab Notify integration
- Events for extensibility
- OctoberCMS 3.x
- Sixgweb.Attributize
- Sixgweb.Conditions
- Sixgweb.ConditionsAttributize
Add the plugin to your project via the OctoberCMS Marketplace and run the following command in your project root:
php artisan project:sync
Install via composer by running the following command in your project root:
composer require sixgweb/forms-plugin
The forms area contains all of the forms for your project and provides the following configuration:
Field | Description |
---|---|
Is Enabled | Enable or disable the form |
Name | The name of the form |
Description | The description of the form, shown above the form fields |
Confirmation Message | The message displayed to the user upon successful entry. Message does not display if form set to redirect after submission |
Field | Description |
---|---|
Submission Redirect URL | URL to redirect to after submission. Leave blank to show form confirmation message. |
Save Entries | Save entries to the database |
Purge Entries | Purge entries saved to the database, after a specified number of days |
Purge Days | Number of days to keep form entries in database |
Throttle Entries | Limit the number of Entries Allowed in a given Time Period/Unit |
Entries Allowed | Number of entries allowed in the given time period |
Entry Time Period | Time period number to allow number of entries |
Entry Time Period Unit | Unit of time used for the time period value |
Throttle by IP Address | Throttle entries by IP address, instead of session ID. If user is logged in, throttling is done by user ID regardless of this setting |
The Attributize fields editor is available, after the form has been created.
Displays the Attributize field editor.
::: tip Automatic Conditions Fields created under the Fields Tab will automatically have a condition created for the current form. :::
Displays the form Conditions editor, allowing conditions required to view the form.
The Entries Controller displays all the form submissions for your website, filterable by Form and/or Creation Date.
Once a form is selected in the Form filter, you will have the corresponding fields available in the List Setup and any fields with the setting Is Filterable added to the filter widget.
Fields without form conditions will alway be visible. Fields with form conditions will appear/hide based on the selected form value.
Form entries can be exported directly from the list view or via the export behavior. Entries can be imported via the import behavior. Read the Documentation to learn more about OctoberCMS import/export behaviors.
Set up your desired list columns and filter values and press the Download Results button to export the current list to a .csv file
Press the Export button to view the entry exporter. Selecting a Form value in the exporter will update the available columns.
Press the Import button to view the entry importer. Selecting a Form value in the importer will update the available columns.
The following functions are provided by the Forms plugin.
Generates nested HTML from the model's field values.
{% set options = {'container':'div', 'wrapper':'div', 'label':'strong', 'labelSeparator':' - ' } %}
{{ entryFieldValuesToHTML(entry, options)}}
Fieldable model. In this case, the Entry model
Key | Description | Default |
---|---|---|
container | Container HTML element. | ul |
wrapper | Element wrapper HTML element. | li |
label | Element wrapper for field name. | strong |
labelSeparator | Separator between field name an value | : |