Search Results for

    Show / Hide Table of Contents

    General settings of form component

    Display settings

    The settings in the Display tab is for modifying the front-end UI of a component.

    Following is the general settings in the Display tab of form components.

    Label

    This option is used to define the name or title of the field. You can also input the text resource key for the label if you want to field label to be displayed in multiple languages.

    image-20241217161536259

    Label Position

    This option is used to define the position for the label of the field. There are 6 options in the list of positions, you can choose an item from the provided list.

    image-20241217162438827

    • Top: the label will be displayed on the top of the component and left-aligned

    image-20241218134806939

    • Left (Left-aligned): the label will be displayed at the left of the component and aligned to the left of the component width span.

    image-20241218134846179

    • Left (Right-aligned): the label will be displayed at the left of the component and aligned to the right of the component width span.

    image-20241218135012312

    • Right (Left-aligned): the label will be displayed at the right of the component and aligned to the left of the component width span.

    image-20241218135150997

    • Right (Right-aligned): the label will be displayed at the right of the component and aligned to the right of the component width span.

    image-20241218135854710

    • Bottom: the label will be displayed below the component and left-aligned.

    image-20241218135624974

    Label Width

    This option is used to define the width of label on line in percentages. By default, the label width is 30%. This option is only enabled if the Label position is Left/Right.

    image-20241218141056758

    image-20241218140459949

    Label Margin

    This option is used to define the width of label margin on line in percentages. By default, the label margin width is 3%. This option is only enabled if the Label position is Left/Right.

    image-20241218142227383

    image-20241218142521488

    Placeholder

    This option is used to define the placeholder text that will appear when this field is empty.

    image-20241218143114295

    Description

    This option is used to define the description of the field which is displayed below the field. You can style the description content by using HTML.

    image-20241218143841353

    Tooltip

    This option is used to define the tooltip of the field. If the tooltip is defined, a question mark icon will be displayed at the right of the field label in front-end view. When the end-user hovers over the icon, the tooltip content will be displayed. You can style the tooltip content by using HTML.

    image-20241218150715475

    Prefix

    This option is used to define the text which is shown before the input field. For example, using 'DKK' for currency.

    image-20241218151338695

    Suffix

    This option is used to define the text which is shown after the input field. For example, using '%' for percentage.

    image-20241218153338448

    Custom CSS Class

    You can add custom CSS class to apply the styling and formatting to the component. You may add multiple class names separated by a space.

    image-20241219105443263

    Tab Index

    This option is used to define the order of the focused fields when the end-user presses the Tab keyboard. If the tab index is filled, the default tab order of the form will be overridden.

    image-20241219113823206

    Autocomplete

    This option is enabled by default. This option is used to indicate whether the input fields will automatically populate data from values previously entered by the user dictated by the cache of the user's browser. Input the off value inside the setting field to disable.

    image-20241219115248981

    Hidden

    This option is used to hide the field from the rendered form at the view of end-users. However, a hidden field is still a part of the form JSON. You can use it in combination with the dependency rule of visibility and accessibility.

    Given the example that the Auxiliary documents field is hidden by default, and is only displayed, enabled, and required if the value of Project duration field is longer than 6 months. In this case, the Hidden checkbox in the configuration of the Auxiliary documents field should be ticked.

    image-20241219115317796

    Hide Label

    Tick this checkbox if you want to hide the label of this component. After the checkbox is ticked, the field label is still displayed in the design mode, and will be hidden on the rendered form at the view of end-users.

    image-20241219115630278

    Show Word counter

    Tick this checkbox if you want to show the count of the filled words while the end-user is typing.

    image-20241219115754693

    image-20241219120054924

    Show characters counter

    Tick this checkbox if you want to show the count of the filled characters while the end-user is typing.

    image-20241219131606021

    image-20241219131621818

    Hide Input

    Tick this checkbox if you want the input data on the field is displayed with the circle characters like how it is displayed on the password fields. This settings can be used to handle the case of sensitive data, such as Tax ID or SSN.

    This option does not encrypt the data on the server. Do not use this setting for Passwords.

    image-20241219141054729

    image-20241219141524156

    Initial Focus

    Tick this checkbox if you want the field is focused initially on the rendered form when the form is loaded. Only one component should have the Initial Focus setting enabled. If more than one component on the form has the Initial Focus setting enabled, only the last component in the JSON structure with the setting enabled will be focused on the form.

    image-20241219141048054

    Allow Spellcheck

    Tick this checkbox if you want to enable the real-time spellchecking for input fields on the rendered form. This settings is turned on by default.

    image-20241219142041955

    image-20241219142559147

    Disabled

    Tick this checkbox if you want the field is displayed in disabled state on the rendered form. The end-user cannot input data to the disabled field.

    image-20241219142649420

    image-20241219143406239

    Table View

    If checked, the input data of the field will be shown in the table view of the submissions list.

    image-20241219145124607

    Modal Edit

    Tick this checkbox if you want the end-user to input data for the field in a modal window.

    image-20241219145417899

    If this option is enabled, on the rendered form, the input field will be replaced with a button.

    image-20241219150519360

    Then, when the end-user clicks the button, a modal window will be opened to input, or edit the field data.

    image-20241219150451786

    Data settings

    The settings in the Data tab are utilized for configuring end-user input data, determining how it interacts with other field data within the form, and how it is stored on the server, such as setting a default value or configuring data calculations.

    Following is the general settings in the Data tab of form components.

    Default Value

    This option is used to define the default value which will be displayed in the field when the form is rendered. If the end-user does not make any change in the field, the default value data will be saved with the submission.

    image-20241223100743527

    Input Format

    This option is used to force the output of the field to be sanitized in a specific format. There are 3 format options: Plain, HTML, Raw

    image-20241223104619773

    Persistent

    This option is used to determine how the field data will be stored when the form is submitted. There are 3 persistent options: None, Server, Client. The default selected option is Server.

    • None: The front-End will submit the data to the backend, but the backend will not store the value. This option should be selected in case the client-side logic is needed on the form without the requirement of sending or saving the data to the server.
    • Server: The Front-End will submit the data to the backend, and the backend will store the value.
    • Client: The Front-End will not submit the data to the backend, and the backend will not store the value. This option should be selected in case the server needs to intercept data for workflows such as logic or calculations, but there is no need or desire for the data to be stored.

    image-20241223105836212

    Protected

    This option is used to prevent the field data from being queried from an API call. Tick this checkbox if an extra layer of protection is needed for sensitive data.

    image-20241223110351232

    Database Index

    Tick this checkbox if you want to set this field as an index within database. It is used to increase the performance for submission queries.

    image-20241223110435997

    Truncate Multiple Spaces

    Tick this checkbox if you want to remove the unnecessary spaces between words or characters within the field.

    image-20241223112219502

    Redraw On

    This option is used to refresh the component when a specific changes occurs on the rendered form. This option includes a dropdown list of fields added in the form, you can select a field from the dropdown list; then, when it is a change on the selected field, the component will be refreshed. If you select the option Any change in the list, the component will be refreshed when it is any change occurs on the rendered form.

    image-20241223115058991

    Clear Value When Hidden

    This option is used to clear the entered field value when the field is hidden. By default, this settings is on. Untick the checkbox if you want the field value to be retained and subsequently re-displayed when using conditional logic.

    image-20241223112317767

    Custom Default Value

    With this option, you cab write custom Javascript or JSON Logic to set the default value of the field.

    image-20241223132731790

    Calculated Value

    With this option, you can write custom Javascript or JSON logic to set up calculation logic on the field.

    image-20241223133503700

    Calculate Value On Server

    This option is used to run the calculations on the server side. If you want to override the values submitted on the back-end with the calculations performed on the server, this setting is beneficial.

    image-20241223133928408

    Allow Manual Override of Calculated Value

    By default, the end-user cannot input any value to the field having the set calculations. Tick this option if you want the end-user to be able to input data to override the calculated value in the field.

    image-20241223134412408

    Validation settings

    The settings in the Validation tab relate directly to the configurable Front-End and Back-End validations for the field, such as required fields, unique data, min/max requirements, custom validations, and custom error messages.

    Following is the general settings in the Validation tab of form components.

    Validate On

    This option is used to determine when the front-end validation of this component should be triggered. There are 2 options: Blur, Change.

    • Blur: The validation will be triggered when the field is no longer focused. This option is useful for the case that the field requires a certain format, so that the validation will only be triggered when the end-user has completed the data input, for example: email, phone number.
    • Change: The validation will be triggered whenever it is a change in the field.

    image-20241223140559925

    Required

    Tick this checkbox if you want to show a red asterisk at the right of the field label, and force the end-user to input data for the field before submitting the form. If the end-user submits the form without filling data for the required field, an error message will be displayed and the form cannot be submitted.

    image-20241223140711181

    Unique

    Tick this checkbox if you want to disallow submitting the same value for the field multiple times. For example: Apply this validation to the Email field of a registration form, so that an email address cannot be submitted twice.

    image-20241223140911708

    When this setting is on, on the rendered form, if the end-user submits the form with the duplicated value of the field, the submission will be prevented and the error message of duplicated value will be displayed.

    image-20241223155605395

    Minimum Length

    This option is used to define the minimum number of characters of the input data. If the end-user input the data which is less than the minimum length, the error message of minimum number of characters will be displayed.

    image-20241223145315747

    Maximum Length

    This option is used to define the maximum number of characters of the input data. If the end-user input the data which is greater than the maximum length, the error message of maximum number of characters will be displayed.

    image-20241223145552284

    Minimum Word Length

    This option is used to define the minimum number of words of the input data. If the end-user input the data which is less than the minimum word length, the error message of minimum number of words will be displayed.

    image-20241223145800045

    Maximum Word Length

    This option is used to define the maximum number of words of the input data. If the end-user input the data which is greater than the maximum word length, the error message of maximum number of words will be displayed.

    image-20241223145948936

    Regular Expression Pattern

    With this option, you can define a Regex pattern (or filter) that details a set of strings that must match the pattern. Following is the example of the email address pattern

    image-20241223150437450

    On the rendered form, if the end-user inputs the data which does not match the defined pattern, error message of not matched pattern will be displayed as following.

    image-20241223150525425

    And the validation is passed if the entered data matches the defined pattern

    image-20241223150602553

    Error Label

    With this option, you can define the field label which is shown in the error message when the validation is triggered. This option is useful for the case that the field label is too long and you want to shorten the error message.

    image-20241223151806611

    Following is the display of the defined error label in error message on the rendered form:

    image-20241223152027523

    Custom Error Message

    With this option, you can define a common error message which is used for all validations.

    image-20241223152234538

    On the rendered form, when any validation is triggered, the common error message is displayed instead of the error message related to the validation.

    Following are the examples for the display of common error message for the validation of not matching Regex pattern,

    image-20241223153433566

    and the validation of required field:

    image-20241223153138049

    Custom Validation

    With this option, you can write Javascript to set up your own validation rules for the field.

    • Secret Validation: Tick this checkbox if you want the custom validation logic is performed only on the server side. This option keeps your validation logic private and secret.

    image-20241223154613199

    JSONLogic Validation

    With this option, you can write JSON logic to set up your own validation rules for the field.

    image-20241223154740015

    Custom Errors

    With this option, you can define different custom error messages for multiple errors, meanwhile the Custom Error Message setting only allows you to set one error message for all errors.

    image-20241223163146134

    API settings

    The settings in the API Tab contain Back-End settings such as the Property Name of the field as well as custom properties that can be set such as HTML and Tags.

    Read more.

    Conditional and Logic settings

    The settings in the Conditional tab, and Logic tab is for the creation of intelligent workflows using Conditions and Logic system of Form.io, such as show or hide the fields, merge component JSON schema, conditionally set field settings, and more, all based on user interaction on the form.

    Read more.

    In This Article
    Back to top Generated by DocFX