Button Component

 

Estimated Reading Time:  10 minutes

Overview

The Button component adds an interactive, clickable element to your module. Buttons allow end-user End-users, also known as Express Users, are the individuals accessing an application through Express View. In most cases, end-users are the customers using the product.s to perform actions and make choices with a single button-click. As a creator Also known as Unqork Users, or Designer Users; is anyone who is inside the Unqork platform., 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.

What You'll Learn

After completing this article, you’ll know when to use a Button component, how to configure its settings, and how to use it in an Unqork application.

About the Configuration Window

TIP  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.

Display Panel

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's look and feel; there's no effect on the Button's function.

Button Width

A choice chip showing the following options:

  • Fixed: The Button's width adjusts based on the length of its Label Text.

  • Block: The Button'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).

 

Adding a Button Component

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.

What You Need

For this configuration, you'll need the following components:

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 A Property ID is the unique field ID used by Unqork to track and link components in your module. 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 A Property ID is the unique field ID used by Unqork to track and link components in your module. and Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. 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 A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter emailAddress.
3. In the Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. 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 A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter phoneNumber.
3. In the Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. 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 A Property ID is the unique field ID used by Unqork to track and link components in your module. field, enter btnSave.
3. In the Label Text Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. 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 Displays or hides a confirmation dialog on button-click. The confirmation dialog also allows end-users to confirm their intention to complete the Button's associated action. toggle to (ON).
6. In the Dialog Heading Enter a title for the confirmation dialog to display on button-click. field, enter Please read and confirm.
7. In the Dialog Message Display Dialog on Click 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 Enter a Label for the Button to dismiss the dialog message. Actions associated with the button-click will not continue. field, enter No, cancel.
9. In the Button Label for Confirm Enter a Label for the Button to confirm understanding of the dialog message. Actions associated with the button-click will continue. field, enter OK, continue.

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

10. Under Additional Styling, in the Right Icon Use this field to add icons (glyphs) to the right of your Button's Label Text. 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 Express View is how your end-user views you application. Express View also lets you preview your applications to test your configuration and view the styling. This is also the view your end-users will see when interacting with your application. After configuring a module, click Preview in the Module Builder to interact with the module in Express View.. You'll see the following functionality:

Resources