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.

ajax Renamed in 5.0+

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

showProcessingSpinner Renamed in 5.0+

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

showProcessingText Renamed in 5.0+

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

processingText Renamed 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 a Success banner above
  • load-success-template - Replace form with a 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 form with a Success message success behavior, e.g. my-success-template.twig.

successMessage

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

errorMessage

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

duplicateCheck Renamed 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 - Do not limit (default - no limits applied)
  • no_limit_logged_in_users_only - Logged in Users Only - No Limit
  • once_per_logged_in_user_only - Logged in Users Only - Once per Form
  • once_per_email - Anyone - Once per Email Address
  • once_per_user_or_cookie - Anyone - Once per Logged in User or Guest Cookie
  • once_per_user_or_ip_cookie - Anyone - Once per Logged in User or Guest IP or Cookie

stopSubmissionsAfter

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