Button Component

 

The Button component adds an interactive, clickable element to your module. Buttons allow end-users to perform actions and make choices with a single button-click. As a creator, you can use Buttons to set custom actions or process flows based on your end-user's choices.

You'll find the component under the Secondary Fields group to the left of the Module Builder.

To learn more about general component settings and those that display when a component is associated with Data Models, view our General Component Settings article.

Field Text

A static image displaying the UDesigner Button component's Field Text setting.

Setting

Description

Label Text

Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field.

User-friendly labels make your module more accessible. Keep labels short and descriptive (a word or two) using title case. For longer entries, use sentence case.

Default State Options

A static image displaying the UDesigner Button component's Default State Options settings.

Setting

Description

Disable User Input

Stops the end-user from using the button. Your end-user sees the display as grayed out and the button as unclickable.

By default, the Disable Button toggle is set to (OFF).

Hide Field

Displays or hides the Button from view. Setting the Hide Button toggle to ON hides the Button in Express View. Setting the toggle back to (OFF) unhides the Button. The component will always remain visible in the Module Builder.

By default, the Hide Button toggle is set to (OFF).

Formatting

A static image displaying the UDesigner Button component's Field Text setting.

Setting

Description

Button Style

Sets the visual appearance of the button. Options include: Primary, Secondary, Success, Danger, Warning, Info, Light, Dark, and Link. The Button Style only affects the Button component's appearance and does not effect its function.

Button Width

Options for determining the width of the button:

Inline image displaying a selected radio button. Fixed: The Button component's width adjusts based on the length of its Label Text.

Inline image displaying a selected radio button. Block: The Button component's width is the full width of the page or column, with the Label Text centered.

Restrict to Single Click

When set to  (ON), the Button becomes disabled after one click. This feature helps end-users avoid triggering the Button's action more than once (or button-mashing).

If you need to re-enable a disabled button, you can do so using a logic component. To re-enable, set up a logic component, like an Initializer, to send a disabled value of no to your Button component. This can be helpful if the action your Button triggers fails.

Restrict to Single Click, Prevent Disabling on Submission, and Disable on Invalid Forms are all guardrails. The Restrict to Single Click option applies to every button-click, whether you create a submission or not.

By default, the Restrict to Single Click toggle is set to (OFF).

As an example, let's create a simple information intake module with a Save-action button. We'll customize the appearance of the Button component by adding an icon to it. We'll also set a custom confirmation dialog.

Configure the Columns Component

The Columns Component Icon Columns component helps organize your module.

1. Drag and drop a Columns Component Icon Columns component onto your canvas.
2. In the Property ID field, enter columns.
3. Under Formatting, click the icon displaying  (two) evenly-spaced columns.
4. Click Save Component.

Configure the Text Field Components

Start the configuration with two Text Field components to capture the end-user's first and last names. By placing the Text Field components in the Columns component, the fields will appear next to each other.

1. Drag and drop two  Text Field components onto your canvas. Place one component in each column of your columns Columns Component Icon Columns component.
2. In the Property ID and Label Text fields, enter the following:
Property ID Label Text

firstName

First Name

lastName

Last Name

3. Click Save Component for each component as you complete it.

Configure the Email Component

Next, an  Email component collects the end-user's email address.

1. Drag and drop an  Email component onto your canvas, placing it in the first column of the columns Columns Component Icon Columns component, below the firstName Text Field component.
2. In the Property ID field, enter emailAddress.
3. In the Label Text field, enter Email Address.
4. Click Save Component.

Configure the Phone Number Component

Use a dedicated Phone Number component to collect the end-user's phone number.

1. Drag and drop a Phone Number component onto your canvas, placing it in the first column of the columns Columns Component Icon Columns component, below the emailAddress  Email component.
2. In the Property ID field, enter phoneNumber.
3. In the Label Text field, enter Phone Number.
4. Click Save Component.

Configure the Button Component

The Button component Icon Button component saves and creates a submission with the information on the page. After you customize your button's appearance, ask the end-user for permission to contact them.

1. Drag and drop a Button component Icon Button component onto your canvas, placing it in the first column of the columns Columns Component Icon Columns component, below the phoneNumber  Phone Number component.
2. In the Property ID field, enter btnSave.
3. In the Label Text field, enter Save.
4. Navigate to the Button component Icon Button component's Advanced settings.
5. Under Additional Display Options, set the Display Dialog on Click toggle to  (ON).
6. In the Dialog Heading field, enter Please read and confirm.
7. In the Dialog Message field, enter I agree to share my information with Farmers Insurance Group. I give permission to Farmers Insurance Group to contact me..
8. In the Button Label for Dismiss field, enter No, cancel.
9. In the Button Label for Confirm field, enter OK, continue.

A static image displayign the Button component's Additional Display Options settings.

10. Under Additional Styling, in the Right Icon field, enter glyphicon glyphicon-ok-sign. This adds a checkmark icon to your button.

A static image displaying the Button component's Right Icon settings.

11. Click Save Component.
12.  Save  your module.

Preview your module in Express View. You'll see the following functionality: