Forms

Introduction

The Forms entry type is used to generate submittable forms with reCAPTCHA support. The field types are generated by the form.yaml blueprint type.

It includes a form builder with various fields to create and customize form fields. It includes options to set labels, slugs, field types, placeholders, and validation rules. It also allows for setting a success message, enabling reCAPTCHA spam prevention and notifications, and adding recipients for the form.

Form Entry Properties

Forms fields have the following options:

  • Field Label: Used to display a label before the input field

  • Field Slug: Used for form submissions

  • Field Type:

    • Text (Simple Text Field)

    • Multi-line Text (<textarea>)

    • Checkbox

    • Dropdown (<select>) with options

    • File (File Upload)

  • Placeholder (Text inside the field)

  • Validation (Enable Field Validation)

    • Required

    • Email (Checks if the value in the field is an email)

    • Numeric (Checks if the value in the field is numeric)

    • Phone (Checks if the value in the field is a phone number)

    • Image (Checks if the file is an image, pairs well with File upload)

    • Regular Expression (Advanced). See Regex Validation

    • Custom Rule (Advanced). See Custom Rules

  • Field Width

Regex Validation

This validation type allows you to use regular expression to validate the field. If you know regex, you can use it to validate the text. This gives you more power to validate fields.

There's also a note to anyone (particularly clients) to let them know that this is advanced behavior.

Custom Rules

This validation type allows you to specify custom rules to validate the fields. If you're familiar with Laravel Validation, you can use this to give you more power to validate form fields.

There's also a note to anyone (particularly clients) to let them know that this is advanced behavior.

It works by taking the string from the custom rule field and splitting it at the : if there is one.

To see a list of available validation rules, See the October CMS Validation Documentation

Template Files

The files below are used to display content throughout the site. Below is an explanation of what each file does and how things are rendered.

Partials

tailor_modules/form.htm

This file is used in the Form Section block and the Form Column block.

Blueprints

builder/form/*

These files are used to render the top level Section blocks in the Dynamic Page Builder

Last updated