---
sourceDocument: Brazil Build or modify applications
sourceDocumentLink: https://www.servicenow.com/docs/r/application-development

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Form component setup

# Form component setup {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 13 minutes to read  
The Form component groups fields into sections based on the form layout configuration of the given view and provides user input fields.

## Before you begin

This component contains a preset configuration. Presets
automatically configure properties and event handlers for a component, making the
component ready to work when you add it to a page. You can apply one preset to a single
instance of a component on a page. For more information, see [Automatically configure components using presets](https://www.servicenow.com/docs/eFRoznvnJXSEND1RjAXpSg#presets "Use component presets to automatically configure components on compatible pages.") .

A preset connects to a controller, which acts as a data
resource for the component. Controllers provide the configuration data and event binding
the component needs to function in your experience. For more information see [Bind data to UI pages using controllers](https://www.servicenow.com/docs/P52VaYAm9py9PHh7UM81~A#controllers "Controllers simplify the linking of data and event logic to enable component presets in UI Builder.") .  
This task assumes you have placed the component on the page and are ready to configure the properties and events. For instructions on accessing and using features in UI Builder, see [Customize UI Builder pages using components](https://www.servicenow.com/docs/YMtTz79hYjmj5_kMcObIuA "Learn what a component is in UI Builder. Also, see how components work within UI Builder.").  
Note:  
This document describes the latest component functionality. Go to the store to make sure you have the latest version of the component.

Role required: admin or ui_builder_admin

## Procedure

1. Define a label for Form that differentiates it from other components in the content tree.  
   A descriptive label makes finding the component easier in a large list of components. For instructions on using the content tree, see [Manage UI pages and page variants](https://www.servicenow.com/docs/Hq7OFdFRjvDFnNsfdtsMGw "Learn what a page is in UI Builder. Understand the building blocks of a UI Builder page, such as column layouts and components.") .  
   ![Shows the content tree in UI Builder with the unique name for the form component]()  
2. Select the Form component, using one of these methods:
   * Click anywhere within the component.
   * Select the Action bar label you created for your component in the content tree.

   {#form-component-uib-setup__choices_cvz_4bp_ytb}  
   The preset selection panel appears in the pane on the right.  

3. Select either None to configure the component properties manually, or select one of the available presets to use pre-configured properties and events for the component.  
   When you select the first preset on a page, a configuration panel appears with instructions for configuring the required controller for that preset. For more information, see [Automatically configure components using presets](https://www.servicenow.com/docs/eFRoznvnJXSEND1RjAXpSg#presets "Use component presets to automatically configure components on compatible pages.")   

4. Supply the data that connects a preset to its controller and select Use.  
   UI Builder automatically configures any other presets in the page to use the
   same controller with the same configuration. For more information, see [Add a controller](https://www.servicenow.com/docs/P52VaYAm9py9PHh7UM81~A#add-controller "Add a data controller to your page to use component presets.").
{#form-component-uib-setup__steps_bvz_4bp_ytb}

## Form component properties {#ariaid-title2}

Properties in the Form component have preset configuration values. You can accept these values or override them manually.
Presets are intended to suit a specific use case. However, you can override a property that has a preset value with a custom configuration if necessary for your design. For details on overriding and resetting presets, see [Override a component preset](https://www.servicenow.com/docs/eFRoznvnJXSEND1RjAXpSg#override-a-preset "Override a component preset to enter your own custom values.").  
Important:  
Preset values that you override aren't updated automatically when you upgrade the instance.

### Available presets {#form-config-properties__section_llb_mgp_ytb}

Record form
:   This preset provides a complete record form with user input fields and related records. This preset requires the Form controller.  
    Properties included in this preset are:

    * Sections
    * Fields
    * Table
    * Related Lists
    * Sys ID
    * View
    * Configuration
    * Changed Fields in serialized JSON string
    * Encoded Record
    * User Session information
    * Form Messages
    {#form-config-properties__ul_m4c_wzs_g5b}

### Legacy form and multiple forms {#form-config-properties__section_hrw_rdp_cbc}

You can have 2 or more forms on a page. However, if you want to add a form to a legacy page with an existing form, you must do the following:

1. Because the legacy form controller doesn't have a preset, you must add the Form controller preset to it:
   1. Select the data resource Form Controller.
   2. In the Edit Form Controller dialog, select Form controller preset from the list of presets.

   {#form-config-properties__ol_yh1_g5w_cbc}

2. When you add multiple forms to a page, the form controller for the first form you add is mapped to the page app shell. This mapping enables the form to communicate with the app shell elements, for example to display form information in a browser tab, and in notifications. When you already have a legacy form on a page and you add another form, you must specify which form you want to map to the page app shell:  
   Note:  
   The Is mapped to App Shell property is set on the form controller not the form component.
   1. Select the form controller for the form.
   2. In the Edit Form Controller dialog, scroll to the bottom of the list of properties in the Config tab.
   3. Select the Is mapped to App Shell property.

   {#form-config-properties__ol_fr1_pxq_cbc}
{#form-config-properties__ol_w3z_qwp_cbc}

### Form controller property {#form-config-properties__section_pr1_bkp_rnb}

{#form-config-properties__id_awh_vhc_hbc__entry__2}

| Label \[property\] | Description |
|-|-|
| Is mapped to App Shell \[isMappedToAppShell\] | To support multiple forms on a page, must be set to true for each unique Form controller instance. Default: true for the first form placed on a page; false for a legacy form and for all other forms. |
[ ]

{#form-config-properties__id_awh_vhc_hbc}

### Properties {#form-config-properties__section_jys_d3c_hbc}

{#form-config-properties__table_qr1_bkp_rnb__entry__2}

| Label \[property\] | Description |
|-|-|
| Table \[table\] | Table name for the record header. |
| Sys ID \[sysId\] | Sys ID for the record header. |
| Workspace ID \[workspaceConfigId\] | Sys ID for workspace configuration this record is in. |
| Query \[query\] | An encoded query string to filter the fields displayed. |
[Table 1. Data]

{#form-config-properties__table_qr1_bkp_rnb} {#form-config-properties__table_ht2_fqr_ydc__entry__2}

| Label \[property\] | Description |
|-|-|
| View \[view\] | View to use to display the record. |
| Forced view name \[forcedViewName\] | View to use to override the view designated using the view property. |
| Enable previous record button \[enablePreviousRecordButton\] | Shows or hides the previous button. When true, the previous button is visible and the previous record is available. Default: false |
| Enable next record button \[enableNextRecordButton\] | Shows or hides the next button. When true, the next button is visible and the next record is available. Default: false |
| Show nav record buttons \[showNavRecordButtons\] | Shows or hides the up and down navigation record buttons. Default: false |
| Sections \[sections\] | Sections used to group fields in the form. Sections can be manually set to an array of static values or linked to a data resource. |
| Fields \[fields\] | Array of field objects. Each object contains the information that is passed to the rendered field component. |
| Related Lists \[relatedLists\] | A list of records related to the current record. |
[Table 2. Default display]

{#form-config-properties__table_ht2_fqr_ydc} {#form-config-properties__table_g4j_gqr_ydc__entry__2}

| Label \[property\] | Description |
|-|-|
| Hide form context menu \[isContextMenuHidden\] | Shows or hides the form context menu. Default: false |
| Hide "Jump to section navigation" \[isSectionMenuHidden\] | Shows or hides the context menu section "Jump to section navigation". Default: false |
| Hide "More form options" \[isFormOptionsHidden\] | Shows or hides the context menu section "More form options". Default: false |
| Hide "View" \[isViewSectionHidden\] | Hides view that is used to render the form when set to true. Default: false |
[Table 3. Context menu options]

{#form-config-properties__table_g4j_gqr_ydc} {#form-config-properties__table_jhd_hqr_ydc__entry__2}

| Label \[property\] | Description |
|-|-|
| Hide all section titles \[isSectionTitleHidden\] | Shows or hides all the section titles. If disableCollapse is set to true, the entire section header is hidden. Default: false |
| Hide first section title \[isFirstSectionTitleHidden\] | Shows or hides the first section title. If `disableCollapse` is set to true, the entire section header is hidden. Default: false |
| Disable section collapsing \[disableCollapse\] | Lets user collapse sections. Default: false |
| Section Heading Level \[sectionHeadingLevel\] | Use to define the section heading level from 1 to 6 for the section headers. Default: 2 |
[Table 4. Form section options]

{#form-config-properties__table_jhd_hqr_ydc} {#form-config-properties__table_dy4_gkd_cfc__entry__2}

| Label \[property\] | Description |
|-|-|
| Enable unsaved field indicator \[enableUnsavedFieldIndicator\] | Shows or hides a field-level indicator when a field is in an unsaved state. If set to false, an indicator in the form of a black dot appears next to each field with updates that aren't saved. Default: true |
| Enable unsaved field indicator background \[enableBgColorForUnsavedFieldIndicator\] | Enable unsaved field indicator must be set to true to use this property. Shows or hides a background color indicator that displays a background color to fields that have unsaved changes. Default: false |
| Hide field context menu \[isFieldContextMenuHidden\] | Whether admins can access the field context menu. If set to false, the field context menu is hidden. When true, admins can't access the field context menu. Default: true |
| Label wrapping limit (px) \[labelWrappingLimit\] | Wraps the label instead of truncating it if the container width is less than the limit specified. Default: truncates the label |
[Table 5. Field options]

{#form-config-properties__table_dy4_gkd_cfc} {#form-config-properties__table_w4s_hqr_ydc__entry__2}

| Label \[property\] | Description |
|-|-|
| Landmark \[landmark\] | Includes the component as a part of the keyboard shortcut landmark focus, allowing keyboard-only users to quickly navigate through a page and between primary components. Default: false |
[Table 6. Accessibility]

{#form-config-properties__table_w4s_hqr_ydc} {#form-config-properties__table_cs3_3qr_ydc__entry__2}

| Label \[property\] | Description |
|-|-|
| Configuration \[config\] | Stores configuration details such as show/hide activity stream. Default: showActivityStream: false |
| Changed fields in serialized JSON string \[serializedChanges\] | Shows the serialized dirty fields string. |
| Encoded record \[encodedRecord\] | Contains properties for rendering the activity stream component. |
| User session Information \[userSession\] | Contains the user session information. Default: @context.session.user |
| Form messages \[formMessages\] | Messages that appear on the form. Array properties: * type: Type of message to be displayed. The message type determines how the notification is styled (error\|info\|warning). * message: The message to display. {#form-config-properties__ul_dvn_4rr_ydc} |
[Table 7. Advanced]

{#form-config-properties__table_cs3_3qr_ydc}

### Manual configuration {#form-config-properties__section_htt_q3p_ytb}

To configure properties manually, enter either static or dynamic input. Enter dynamic input by selecting the input type.

* Data binding: Enables you to create dynamic property values derived from multiple sources, such as state variables (@state) in the page, URL variables (@context), or payloads from a data resource (@data). For details, see [Add and configure data resources to a
  page](https://www.servicenow.com/docs/~B53KgSqh6jyRj9wmzg8LA "Add data resources to dynamically expose data from tables, records, or other elements on your page in UI Builder.") .
* Scripting: Creates a scripted property value. For details on scripted values, see [Create and bind a client state parameter to a component](https://www.servicenow.com/docs/JxkxcsWDJlkywLr4rc~p8A "Create and bind a client state parameter value to a component in UI Builder. By adding custom values to your components, these components can then be automatically updated through a script.") .
{#form-config-properties__choices_oz3_vrq_5sb}

## Form component events {#ariaid-title3}

The Events tab shows the events used by the Form component. If you have chosen a preset containing events, data handlers for those events are pre-selected by the controller, and no manual configuration is required. If the
component has events that aren't included in the preset, you must add data handlers manually to configure those events.
Events with presets are marked with the Preset badge. To show events that don't have preset configurations, select + Add event mapping. If the component has only one event, and that event doesn't have a preset, the event is displayed, ready for configuration.  

### Event handlers {#form-config-events__section__dqh_syp_ytb}

Event handlers work with data resources to link the Form actions to the data you want to display to your users. Select the event in the list to add one or more event handlers.

For instructions on adding event handlers to an event, see [Configure an event handler](https://www.servicenow.com/docs/8s23OEG1s5oowl~vaOUlLw "Add an event handler to a page, component, data resource, or declarative action within UI Builder so that your user can trigger an action.").

For instruction on how to add and delete event handlers
with presets and how to disable an event, see [Configure an event handler](https://www.servicenow.com/docs/8s23OEG1s5oowl~vaOUlLw "Add an event handler to a page, component, data resource, or declarative action within UI Builder so that your user can trigger an action.") and [Disable preset event mappings](https://www.servicenow.com/docs/sHHv~qkTu_D_eRd6J0p0IQ "You can disable event mappings that are automatically created by a component preset.").

### Preset events {#form-config-events__section_u2v_dzp_ytb}

Record form
:   This preset provides data handlers for these events:

    |-|-|-|
    | * Preview Record * Item Selected * Add Notification * Remove Notifications * Clear Notifications * Remove form message * Screen Status Changed * Execute UI Action * Refresh Requested * Set Value * Add Option * Remove Option * Set Read Only {#form-config-events__ul_kpt_mwc_35b} | * Set Visible * Show Related List * Hide Related List * Show Related Lists * Hide Related Lists * Clear Messages * Hide Field Message * Clear value * Hide All Field Messages * Set Label * Set Field Placeholder * Set Section Display * Set User Value {#form-config-events__ul_ohz_mwc_35b} | * Add Info Message * Add Warning Message * Add Error Message * Show Field Message * Set Field mandatory * Reload Form * Save a form * Submit Form * Clear Choice Options * Add Form Message * Clear Form Message * Clear All Form Messages * Toggle Annotations {#form-config-events__ul_m2f_nwc_35b} |
    [ ]

    {#form-config-events__table_plk_mwc_35b}

### Event descriptions {#form-config-events__section_sjd_2n5_rnb}

{#form-config-events__table_ujd_2n5_rnb__entry__2}

| Event | Description |
|-|-|
| Preview Record | Action dispatched to preview a record. Payload: * `table`: The table to which the record being previewed belongs. * `sys_id`: The sys ID of the record being previewed. * `query`: Additional data passed to the component. * `params`: Properties passed to the component. * `multiInstField`: Field that is used in conjunction with route and params to support multiple instance of a content. {#form-config-events__ul_t1l_qsq_ytb} |
| Item Selected | Primary navigation action that opens some content. Payload: * `table`: If the content to render is a record, the table of the record. * `sys_id`: If the content to render is a record, the sys Id of the record * `parent_table`: The table of the parent record. * `parent_sys_id`: The sys ID of the parent record. * `render_type`: Default is record. For typed renderers (non-record) it can be a custom string. * `params`: Properties passed to the component rendering the content. * `path`: Hierarchy support for breadcrumbs navigation. Objects in the list have the same shape as rest of the payload. {#form-config-events__ul_f54_htq_ytb} |
| Add Notification | Informs the user of any errors while interacting with the component such as deleting or uploading an attachment. Action dispatched once the field declarative action execution has completed. This action is only dispatched when the record contains fields with field decorators. Payload contains `items` * `type`: Type of message to be displayed. The message type determines how the notification is styled (error\|info\|warning). * `message`: The notification message. {#form-config-events__ul_xz4_n5q_ytb} |
| Remove notifications | Notifications are removed. Payload contains `items`: Array of notification objects to remove, identified by their IDs. |
| Clear notifications | Action to clear all notifications. |
| Remove form message | A single form message is removed, by index. Payload contains `index`: Index of the message to remove |
| Wrapped Action | Action that wraps an intended action in a payload. Payload: * `wrappedAction`: An intended action * `wrappedPayload`: Payload of an intended action {#form-config-events__ul_i2x_gwq_ytb} |
| Screen Status Changed | Action dispatched to indicate that form is dirty. |
| Execute UI Action | Action that is dispatched to execute the specified UI Action. |
| Refresh Requested | Action dispatched on successful field declarative action executions for server script action. This action is only dispatched when the record contains fields with field decorators. |
| Set Value | User sets a value for a given field. Payload: * `fieldName`: Name of the field for which the value is being set * `value`: Value to which the field is being set * `displayValue`: Display value of the field being set {#form-config-events__ul_cng_qwq_ytb} |
| Add Option | Adds an option to a choice type. Payload: * `fieldName`: Name of the field to which the options is added * `choiceValue`: Value of the option * `choiceLabel`: Label of the option * `choiceIndex`: Index of the inserted option {#form-config-events__ul_tld_sxq_ytb} |
| Remove Option | An option is removed from a choice list. Payload: * `fieldName`: Name of a field * `choiceValue`: The choice value {#form-config-events__ul_jdl_gyq_ytb} |
| Set Read Only | Sets a field to read-only when true. Payload: * `fieldName`: Name of the field to set to read-only * `readonly`: If true, set the given field read only {#form-config-events__ul_wpq_4yq_ytb} |
| Set Visible | Sets the field visible if true. Makes the field hidden if false. Payload: * `fieldName`: Name of the field being set * `visibility`: If true, set the given field to visible {#form-config-events__ul_ep4_nzq_ytb} |
| Show Related List | Shows the specified related list on the form. Payload: `listTableName`: Specifies the name of the related list to show |
| Hide Related List | Hides a specified related list on the form. Payload contains `listTableName`: Specifies the name of the related list to hide |
| Show Related Lists | Shows all related lists. |
| Hide Related Lists | Hides all related lists. |
| Clear Messages | Clear all form messages. |
| Hide Field Message | Hides the first (oldest) message by a field. Payload: * `fieldName`: Name of a field to hide a message * `clearAll`: Whether or not to clear all messages. Default: false {#form-config-events__ul_kh3_s1r_ytb} |
| Clear Value | The user clears the value of a given field. Payload contains `fieldName`: Name of the field whose value was cleared |
| Hide All Field Messages | Hide all field messages of a specific type. Payload contains `type`: The type of message to be hidden. The choices are: * `info` * `warning` * `error` {#form-config-events__ul_pqb_rxg_d2c} |
| Set Label | Set the label of a specific field. Payload: * `fieldName`: Name of the field whose label is being set * `label`: Label to display for the field {#form-config-events__ul_hl3_g5v_ytb} |
| Set Field Placeholder | Set placeholder text for a specific field. Payload: * `fieldName`: Name of the field for which placeholder text is defined * `value`: Value to set as the placeholder {#form-config-events__ul_sny_bwv_ytb} |
| Set Section Display | Show or hide a given form section. Payload: * `sectionName`: Name of the form section to show or hide * `display`: If true, shows a given form section. {#form-config-events__ul_rfk_rwv_ytb} |
| Set User Value | Set a value for a given field via user input. Payload: * `fieldName`: Name of the field whose value is being set * `value`: Value to set in the field * `displayValue`: Display value to set {#form-config-events__ul_wpt_fxv_ytb} |
| Add Info Message | Add a form message of type `info`. Payload contains `message`: The info message to display |
| Add Warning Message | Add a form message of type `warning`. Payload contains `message`: The warning message to display |
| Add Error Message | Add a form message of type `error`. Payload contains `message`: The error message to display |
| Show Field Message | Show a field message of a specify type. Payload: * `fieldName`: Name of the field displaying the message. * `type`: Message type. The choices are `info`, `warning`, and `error`. * `message`: Message to display. {#form-config-events__ul_c1y_jyv_ytb} |
| Hide All Field Messages | Hide field messages of a specific type. Payload contains `type`: The choices are `info`, `warning`, and `error`. |
| Set Field mandatory | Makes the field required if set to true. Makes the field optional if set to false. Payload: * `fieldName`: Name of the field to set to mandatory * `mandatory`: If set to true, set the named field to mandatory {#form-config-events__ul_jlj_bzv_ytb} |
| Reload Form | Reload the form with the same table and sysId. |
| Save a form | Save the current record. |
| Submit Form | Trigger form submission using the given UI action name. Payload contains `submitActionName`: Name of the UI action |
| Clear Choice Options | Clears all options for a choice list. Payload contains `fieldName`: Name of the field from which the choice list is cleared |
| Add Form Message | Add a form message of a given type. Payload: * `message`: Message to display * `type`: The choices are `info`, `warning`, and `error`. {#form-config-events__ul_z2d_n1w_ytb} |
| Clear Form Messages | Clear all form messages of a given type. Payload contains `type`: The choices are `info`, `warning`, and `error`. |
| Clear All Form Messages | Clear all form messages. |
| Toggle Annotations | Hide all currently shown annotations or show all currently hidden annotations. |
| Form message button clicked | Event dispatched when a button in a form message is clicked. |
| Set transaction scope | Edit the form within the provided application scope. |
| Clear transaction scope | Clear the form's transaction scope. |
[ ]

{#form-config-events__table_ujd_2n5_rnb}

