Skip to main content
Version: 1.28 (Current)

Forms 2.0 - Button

caution

This page is preliminary and subject to change as Forms 2.0 continues to be developed.

When pressed, a Button performs any actions attached to it. You communicate its purpose using a text label, an icon, an image, or both.

forms-2-0-form-builder-build-button.png

Adding a Button​

Drag the Button tile from the field palette onto the Canvas - see Build for more on adding and arranging fields in general.

Button Type​

The Button Type parameter determines the button's role on the form:

TypeBehavior
PrimarySubmits data, triggers validation, and runs action logic. Also triggered by pressing "Enter" in a field. Only one Primary button is allowed per form.
RegularSubmits data, triggers validation, and runs action logic.
CancelSkips data submission and validation, and runs action logic.

The default is Regular. Inside a Repeater, only Regular and Cancel are offered, because a Primary button submits the whole form. If you move a Primary button into a Repeater, the builder switches it to Regular and tells you.

Validation Scope​

Validation Scope decides which fields are checked for errors when the button is pressed. If any of them fails, the button's actions don't run.

ScopeWhat is checked
NoneNothing. The button's actions run even on an incomplete form. Use it for Save Draft and similar buttons.
Parent ContainerOnly the fields in the Section that holds the button. Layout Containers don't count. If the button isn't inside a Section, every field on the form is checked.
Repeater ItemOnly the fields in the same repeater entry as the button.
Entire FormEvery field on the form.

The options you see depend on the Button Type and on where the button sits:

ButtonOptionsDefault
PrimaryNone, Entire FormEntire Form
Regular, not in a RepeaterNone, Parent Container, Entire FormEntire Form
Regular, in a RepeaterNone, Repeater Item, plus Parent Container when the repeater entry contains a SectionRepeater Item
CancelNone (read-only)None

If you change the Button Type or move the button so that its scope is no longer allowed, the builder resets the scope to the default and shows a message.

Parameters​

Only Button-specific parameters are listed below. See Common Field Settings for the settings shared with other field types.

FieldDescription
Button TypeSee Button Type above.
Button SizeSmall, Normal, or Large.
StyleThe button's Bootstrap style (for example Default, Primary, Success, Danger, or an Outline variant of each).
Button WidthFit to Content (the default, sized to its text or icon) or Full Width (stretches to fill available space).
Button IconAn optional icon to display on the button.
Icon PositionOnly shown when Button Icon is set. Icon Only, Before the Label, or After the Label.
Validation ScopeWhich fields are checked before the actions run. See Validation Scope above.
Root CSS ClassesOne or more CSS class names, separated by spaces, applied to the field's root element only. Supports Tokens.
On Click HandlerThe stack of Actions to run when the button is clicked.

Common settings that apply to Button​

A Button supports these Common Field Settings:

  • General (Label, Name, and Hint)
  • Active
  • Visibility settings
  • Enabled settings
  • Field Automations - On Click only (Button does not support Value or On Change, since it has no value of its own)

Button does not support Field Validators, since it has no value of its own to validate.

note

The On Click Handler parameter above - a stack of server-aware Actions, the same kind used elsewhere in the form - is the main way to make a Button do something, and covers most button behavior. There's also an On Click setting under Field Automations, a client-side JavaScript snippet, for quick client-side-only logic.

Asking the user to confirm​

To show an "Are you sure?" dialog before a button does something, add an Ask for Confirmation action to its On Click Handler. When that action is reached, the actions stop and a dialog opens in the middle of the page. If the user confirms, all the actions run again from the start and continue past the confirmation. If they cancel, nothing else runs, and the actions that already ran are not undone.

Because the actions before Ask for Confirmation run once more after every confirmation, put it before any action that saves data or sends something. See Ask for Confirmation for its settings and an example.

Tokens​

A Button does not return a token - it has no value for the user to submit.


Last updated: November 18, 2026