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.

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.
Skip ValidationNot shown for Cancel type (which always skips validation). When enabled, the button runs without triggering form validation - useful for actions like "Save Draft" that should work even on an incomplete form.
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.

Tokens

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