Skip to main content

Settings objectNew in 5.0+

The Settings object allows you to access all of the form's settings assigned to it in the form builder.

Properties

name

Outputs the name of the form.

handle

Outputs the handle of the form.

type

The type of form, e.g. Solspace\Freeform\Form\Types\Regular.

formattingTemplate

The formatting template assigned to the form inside the form builder, e.g. basic-dark/index.twig.

description

Outputs the description of the form.

color

Outputs the color hex for the form, e.g. #135BD7.

submissionTitle

Outputs the submission title code (unparsed) configured in the form builder.

storeData

A bool variable, which will be 1 if the form is set to store submitted data.

defaultStatus

The default status ID to be assigned to new form submissions, e.g. 2.

collectIpAddresses

A bool variable, which will be 1 if the form is set to collect IP addresses.

allowUsersToOptIn

A bool variable, which will be 1 if the form is set to allow users to choose whether the form submission is saved to the database.

optInCheckbox

The field name of the Opt-in Checkbox, if applicable.

ajaxRenamed in 5.0+

A bool variable, which will be 1 if the form has the built-in AJAX setting enabled.

showProcessingSpinnerRenamed in 5.0+

A bool variable, which will be 1 if the form has the Show Processing Indicator on Submit setting enabled.

showProcessingTextRenamed in 5.0+

A bool variable, which will be 1 if the form has the Show Processing Text setting enabled.

processingTextRenamed in 5.0+

Outputs the custom processing text configured for your form inside the form builder, e.g. Processing....

successBehavior

The chosen behavior to happen after handling the successful submit of the form. Options are:

  • reload - Reload form with banner
  • load-success-template - Replace with success message
  • redirect-return-url - Redirect to another URL

returnUrl

Outputs the return URL configured for the form when using the Redirect to another URL success behavior.

successTemplate

Outputs the success template configured for the form when using the Replace with success message success behavior, e.g. my-success-template.twig.

successMessageImproved in 5.10.13+

Outputs the custom success message configured for the form when using the Reload form with banner success behavior.

Can be accessed directly as {{ form.successMessage }} instead of {{ form.settings.successMessage }}.

errorMessageImproved in 5.10.13+

Outputs the custom error message configured for the form inside the form builder.

Can be accessed directly as {{ form.errorMessage }} instead of {{ form.settings.errorMessage }}.

duplicateCheckRenamed and Revised in 5.0+

Outputs the option chosen for the Duplicate Check setting. You can run a conditional check on this with the following:

  • NULL: No restrictions (default)
  • no_limit_logged_in_users_only: Logged-in users — unlimited
  • once_per_logged_in_user_only: Logged-in users — once per form
  • once_per_email: Anyone — once per email
  • once_per_user_or_cookie: Anyone — once per user or cookie
  • once_per_user_or_ip_cookie: Anyone — once per user, IP, or cookie

stopSubmissionsAfter

The date in which this form will no longer accept new submissions, if configured, e.g. 08/17/2023.