Basic Components

Learn more about the Basic components

Basic components are found at the top of the component groupings within the Form Builder. These components are more commonly used on traditional web forms and should be familiar components if you have ever used a Form Builder in the past. You can find information for each of the Basic Components like unique settings, JSON code, and field examples.

Text Field

A Text Field can be used for short and general text input. There are options to define input masks and validations, allowing users to structure information into desired formats.

Widget:

The widget is the display UI used to input the value of the field. By default, the widget will be set to a traditional Input Field, however, you can change the widget to turn the text field into a calendar picker.

Input Mask: Use an Input Mask when a specific input format is needed. This is useful for enforcing formats like phone numbers, postal codes, SSN, etc.

Display Mask: A display mask helps to display the input in a readable way, this won't affect the value which will be saved (to affect both view and saved value, delete Display Mask and use Input Mask).

Mask Examples

9: numeric a: alphabetical *: alphanumeric Example a Phone Number mask: (999) 999-9999 See the jquery.inputmask documentation for more information.

Apply Mask On: Determines when this component should trigger the configured mask. Defaults to Change.

Change - Validation will actively trigger any time there is a change in the field. This is the default option for every field.

Blur - Validation will only trigger when the field is no longer focused.

Input Mask Placeholder Char: Specify a character to be used as a placeholder in the field. E.g., ˍ

Placeholder char will be replaced by a space if it is used inside the mask

Allow Multiple Masks: Check this setting if the field should allow the end-user to select a mask from a dropdown menu.

Once selected, a grid will appear where you can add a label and corresponding input mask. Click the '+ Add Another' button to add a new Input Mask.

Text Area

A Text Area is a multi-line input field that allows for longer text. The Text Area can also be converted to WYSIWYG content editor.

Rows: Controls how many default rows are set in the Text Area

Editor: This option will convert the text area into one of the following WYSIWYG Editors

Ace

CKEditor

Quill

Enable Image Upload - Check this setting to allow image uploads to the WYSIWYG editor.

Image Upload Storage - Select the Storage provided integrated within the Project.

Save As - This setting determines how the value should be entered and stored in the database.

String JSON HTML

Auto Expand: The Text Area will automatically expand vertically as the user types into the field.

Enable Image Upload: Allows the user to upload an image to the WYSIWG Editor

Editor Settings: Here you can modify the code base of the WYSIWYG Editor to customize the UI specific to your needs.

Number

Use a Number field whenever a field should be limited to a number value type. You can configure options for thousands separators, decimal places, and decimal requirements.

Use Thousands Separator: Check this setting if you would like the value in this component to separate thousands by a local delimiter.

Decimal Places: The maximum number of decimal places for the values in this field.

Require Decimals: Always show decimals for this field, even if trailing zeros.

Password

The password field has the same options as a text field component. It differs from a text field in that its HTML <input> type will be password instead of text. This will cause the field to display hidden input symbols instead of the entered value.

There are no unique settings for the Password component.

Check Box

A check box can be used for boolean value input field. It can either be checked (true) or unchecked (false). There are options to set Shortcut and Input Type.

Shortcut: Add a keyboard shortcut to check/uncheck the component.

Input Type: The input type can be changed from a single input value checkbox or a multi-valued radio component.

The Radio type option is used when setting up dynamic Radio values for a PDF First form.

Select Box

This multi-valued component allows users to select one or more options in checkbox style format. Set your values within the Data tab of the settings. Apply unique settings such as value shortcuts and min/max value validation.

Data Source Type: The source to use for the Select Box options:

Values: Create your own list of static values for the Select Box options. The Label is the front-end identifier for the end user. The value is the back-end identifier for the option and is what is saved to the Database.

When setting the option value, use only Strings or Numeric values.

Data Source URL:

Designate a URL that will provide the option values for the Select Dropdown. Use the Item Template to determine what part of the URL's object will be used as.

When the Data Source URL provides an array of JSON objects, you must specify a Value Property that corresponds to the desired property within each object which is set in the Item Template.

When the Data Source URL is a string, the Value Property setting can be left empty.

For instance, if you want to populate a Select Box with a list of U.S. states, you can achieve this by using an external JSON URL to supply the component's values.

  1. Edit the Select Box settings and click the Data tab

  2. Input the Data Source URL endpoint This example is using a U.S. state endpoint https://cdn.rawgit.com/mshafrir/2646763/raw/states_titlecase.json

  3. Configure the Value Property to match a specific property of the JSON object. This Value Property will be stored in the metadata to represent the option in the back end.

    abbreviation

In this example, the Data Source URL endpoint is an array, so a proprety Value Property

  1. Set the Item Template to configure the displayed value. {{ item.name }}

This example is utilizing the follow URL endpoint containing the following JSON object structure:

[
    {
        "name": "Alabama",
        "abbreviation": "AL"
    },
    {
        "name": "Alaska",
        "abbreviation": "AK"

Shortcut: Add a keyboard shortcut for the designated option.

Options Label Position: Determines the position of the option label relative to it's checkbox

Inline Layout: Displays the option values horizontally

Min/Max Checked Number: Validation that determines the minimum and maximum amount of options to check. Checked options below the minimum will trigger front-end validation. When the maximum amount of options is checked, the remaining options will become disabled.

Min/Max Checked Error Message: Determines the validation message displayed to the user for the minimum or maximum option amount.

Select

The Select component displays a list of values in a dropdown list where users can select one of the values. This component has flexibility on where the data source originates from. There is also a large offering of settings providing different ways of filtering, querying, and loading data values.

Widget Type: Change the Select dropdown widget type:

Choices.js

HTML 5

Unique Options: Display only unique dropdown options removing repeated values.

Multiple Values: Allows the user to select more than one option. Options are saved like tags on the field when the setting is enabled.

Data Source Type: The source to use for the Select component options:

Value, URL, Resource, Raw JSON, and Custom.

(More information in the next tab Data Souce Types)

Storage Type: Select how you want the field data to be stored. Defaults to 'Autotype' if an option is not selected:

String, Number, Boolean, Object

ID Path: Designate the path to select the option ID

Item Template: HTML template that determines how the Select options are displayed within the dropdown. You can use the item variable to access the current object in the array.

EG embed the value by using {{ item.value }} in a template.

Lazy Load Data: When set, a request will not be fired to the URL until this control is within focus. This can improve performance if you have many Select dropdowns on your form where the APIs will only fire when the field is activated.

Request Headers: Set any headers that should be sent along with the request to the url, useful for authentication.

Data Path: The property within the source data, where iterable items reside.

For example: results.items or results[0].items

Value Property: The property of each item in the data source to use as the select value. If not specified, the item itself will be used.

Disable Limiting Response: When enabled, the request will not include the limit and skip options within the query string. This can help with unnecessary requests and performance.

Search Query Name: The name of the search query string parameter used when sending a request to filter results with. The server at the URL must handle this query parameter. If URL or Resource is selected as Data Source Type, enter the name of the search query parameter to filter requests with.

For example, if your URL is http://api.dogs.com/dogs, and Search Query Name is set to type, and then the user types nice in the Select field, then this component will send a request to http://api.dogs.com/dogs?type=nice and update the Select items with the results. If this option is omitted, no new requests will be made when a user enters text in the select field.

Search Delay Request: The delay in seconds before the search request is sent, measured from the last character input in the search field. The default is set to 0.3

Filter Query: Provide additional filtering within the dropdown using query parameters.

Sort Query: Provide additional sorting within the dropdown using query parameters.

created

Returns results based on created date of submissions values in ascending order

-created

Returns results based on created date of submissions values in desecending order

data.propertyname

Returns results based on alpha order of the submission values in ascending order

-data.propertyname

Returns results based on alpha order of the submission values in descending order

skip=10sort=created

skips the first 10 results based on creation date in ascending order

skip=5sort=-created

skips the first 10 results based on creation date in ascending order

Limit: Use this to limit the number of items to request or view within the select field dropdown.

10

Returns only 10 values. When user scrolls to the bottom of the dropdown list, an API call is made returning the remaining results.

Formio Authenticate: Check this if you would like to use Formio Authentication with the request.

Disables Storing Request Result in the Cache: Check it if you don't want the requests and their results to be stored in the cache. By default, it is stored and if the Select tries to request the same URL with the same parameters, the cached data will be returned. It allows to increase performance, but if the remote source's data is changing quite often and you always need to keep it up-to-date, uncheck this option.

Refresh Options On: Refresh the field options based on a change from another field on the form, or any change on the form. This is helpful when dealing with dynamic values, such as the Cascading Select Dropdowns

Refresh Options On Blur: Refresh the field options when a specific field or any field on the form is .

Clear Value Option On Refresh: Clears any selected value if the field is reset by the Refresh Options On setting.

Enable Static Search: When checked, the select dropdown will allow for searching within the static list of items provided.

Search Threshold: Determines when the select component match algorithm gives up. A threshold of 0.0 requires a perfect match, a threshold of 1.0 would match anything. This setting is set to 0.3 by default.

Read Only Value: Check this if you would like to only display the value when in Read Only mode.

Choices.js options: A raw JSON object to use as options for the Select component. Refer to the Choices.js documentation for more information.

Use Exact Search: Disables the Search Algorithm and only allows exact searches to return an option.

Radio

The radio component is a field that allows users to select a single option from a list of options displayed in radio-style format. Users can click a selected option to deselect it, returning the field back to its original state. allows

Data Source Type: The source to use for the Select Box options:

Values: Create your own list of static values for the Select Box options. The Label is the front-end identifier for the end user. The value is the back-end identifier for the option and is what is saved to the Database.

When setting the option value, use only Strings or Numeric values.

Data Source URL: Designate a URL that will provide the option values for the Select Dropdown. Use the Item Template to determine what part of the URL's object will be used as the option values.

For example, suppose you wish to populate your Select Box with a list of all U.S. States of You can use an external JSON URL like the following.

https://cdn.rawgit.com/mshafrir/2646763/raw/states_titlecase.json

Place the URL within the Data Source URL. Provide a Value Property to represent the option which is what will save within the meta-data. When the value is left blank, the entire object will be saved for the option. Modify the Item Template to determine what part of the object the end user will see when choosing an option.

In the image below, the abbreviation, set by the Value Property, will be saved in the meta-data to represent the option within the back end. The end user will see the State name, set by the Item Template, for the option on the front end.

Shortcut: Add a keyboard shortcut for the designated option.

Options Label Position: Determines the position of the option label relative to the option bubble

Inline Layout: Displays the option values horizontally

Button

Buttons can be added to perform various actions within the form. The most obvious function of the Button component is the Submission action. However, you can also utilize the Button component to trigger events associated with workflow logic, reset field data, authenticate to an OAuth provider, and more.

In addition to functionality, the button component offers many settings to change the style and theme of the component.

Action: The functionality that executes when the button is clicked. Click the event to show additional settings related to the selected action:

Submit - Submits the form to the back-end server

- This button action works alongside the Save In State workflow and facilitates a 'Save as Draft' workflow.

Inheritently the action will bypass validation giving the submission a different state.

Reset - Reset all fields on the form back to their pristine state

- Triggers an 'event' on the form which is usually correlated to application logic or form workflow logic

- Opens an OAuth authentication popup. This will only work after it has been assigned to an OAuth Action.

See the OAuth guide for more information on how to set up OAuth in your project.

Post to URL -

- Write custom code to fire

Save On Enter: Use the Enter key to submit the form

Theme: Set a theme (color) for the button mapped to Bootstrap classes

Size: Determines the position of the option label relative to the option bubble

Block Button: Spans the button horizontally across the form

Left/Right Icon: Set an icon to the left or right side of the button label using Font Awesome icon classes.

Disable on Form Invalid: If any field on the form is invalid, disable the button.

Last updated