Input Phone component setup

task brazil Updated Sep 10, 2026 8 min read input-phone-component-uib-setup.md
Raw file servicenow.com

The Input Phone component is a form element input for telephone numbers with country code and computer telephony integration (CTI).

Before you begin

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.

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 your Input Phone that differentiates it from other components in the content tree.

    A 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. For instructions on using the content tree, see Customize UI pages using components.

    [Omitted image "input-phone-content-tree.png"] Alt text: Input phone content tree

  2. Select the Input Phone component, using one of these methods:

    • Click anywhere within the component.
    • Select the Input Phone label you created for your component in the content tree. The property fields appear in the Config tab in the setup panel on the right.
  3. Enter either static or dynamic input in the input fields.

    • Enter static values by typing in the content or selecting it from a drop-down list.
    • Enter dynamic input by selecting the appropriate button:
  4. Select the Events tab in the setup panel on the right and configure event handlers for the actions provided for the Input Phone component.

    For more information about event handlers, see event handlers.

Parent Topic:UIB Setup Information

Input phone component properties

Display a phone number that the user can call by selecting the iconic button​. You can also display a drop-down list of country codes to select, and a blank field allowing the user to input a phone number.

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

Field

Description

Size[size]

Size of the component in either small or medium.Default: Medium

Disabled[disabled]

When enabled, user cannot interact with the field and cannot change its value. The field appears grayed out when disabled.

Read-only[readonly]

When enabled, the user cannot modify the value of the input field. However, the input field is not in a disabled state when this field evaluates to True.

Auto focus[autofocus]

Indicates that focus is automatically placed inside the input field when the page loads.

Field layout configuration[fieldLayout]

Determines whether the labels, field, and slotted content are arranged vertically or horizontally. This property also determines the respective proportions of each element in a horizontal container. The field layout has two configuration properties:

  • layout (string):
    • "layout":"horizontal": Horizontally aligns the label with the field; the label displays to the left of the field.
    • "layout":"vertical" (default): Vertically aligns the label with the field; the label displays above the field.
  • columns (array): If the layout is horizontal, the component uses the columns array to set the grid template column width for the containers.

Label [property]

Description

Value[value]

Sets a value for the input field, including the country code and the numeric string. Unless the input field has pre-populated data, this property should be left empty.

Manage value[manageValue]

If set to true, overrides automatic updates to the Value property. Use the Input phone value set event to intercept the requested change and handle it manually.Default: false

Number[number]

Phone number (excluding the country code) in the main input area of the phone input field.

Identifier[name]

Reference name for the input field dispatched with the field value when the user interacts with the field.

Placeholder text[placeholder]

Hint text displayed in the input field before the user has entered a value. Text should hint to the user what input is expected.

Min characters[minlength]

​Sets a minimum number of characters required for the input field.

Max characters[maxlength]

​Sets a maximum number of characters required for the input field.

Text align[align]

Alignment of the text within the input field.

Label [property]

Description

Country codes[countryCodes]

​

Array of country codes to display in the drop-down list inside the field.

Selected country code[selectedCountryCode]

​"Code" value matching an object from the countryCodes array that is selected in the country code drop-down menu.

Label [property]

Description

Label[label]

Label that tells users the value that should be entered in the input field.

Wrap label[wrapLabel]

If the label doesn't fit on one line, wraps the label.

Required[required]

Indicates that the user must enter a value in the input field before submitting the form.

Hide required indicator[hideRequiredIndicator]

When true, the required indicator is visually hidden. Use for forms where most fields are required, along with the "optional" flag for any fields that are not required

Optional[optional]

Indicates that the user doesn't have to enter a value in the input field before proceeding.

Helper text[helperContent]

Defines the hover text that displays additional help for a field. When this value is specified, ​an iconic button appears next to the field label for displaying hints for the user, such as password requirements or other instructions for completing the field. Use plain text to allow the text to be translatable. If you don't want to add helper content, leave this property empty.

Label [property]

Description

Invalid[invalid]

When enabled, the field appears as visually invalid, indicating incorrect input.

Manage invalid[manageInvalid]

If set to true, overrides automatic updates to the Invalid property. Use the Input phone invalid set event to intercept the requested change and handle it manually.Default: false

Validation pattern[pattern]

​Provides a regular expression for evaluating user input.

Alert messages[messages]

Array of alert messages that display below the field. The following list describes each object's properties:- content: The text of the alert message.

  • status: The type of alert to display.
  • icon: Icon to display at the start of the alert message.

Default:

CSS
{    "name": "content",    "label": "Content",    "fieldType": "string",    "translatable": true},{    "name": "status",    "label": "Status",    "fieldType": "choice",    "typeMetadata": {        "choices": [            {                "label": "Critical",                "value": "critical"            },            {                "label": "Warning",                "value": "warning"            },            {                "label": "Positive",                "value": "positive"            },            {                "label": "Info",                "value": "info"            },            {                "label": "Suggestion",                "value": "suggestion"            }        ]    }},{    "name": "icon",    "label": "Icon",    "fieldType": "icon"}

Label [property]

Description

ARIA properties[configAria]

A JSON field for configuring ARIA properties, such as aria-braillelabel.

## Input phone component events

Select event handlers to configure the actions (events) provided with the Input Phone component.

The Events tab shows the events used by the Input Phone component. To view the available events, select + Add event mapping. Select the event in the list to add one or more event handlers.

Event handlers

Event handlers work with data resources to link the Input Phone events 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.

Event descriptions

Event

Description

Input phone invalid set

The user moves focus away from the input field.Payload contains:

  • name: Value of the name property
  • value: Value of the invalid property, which is based on the values of the required and pattern properties
  • fieldValue: Value entered in the input field

Input phone value set

The user selects a country code from the dropdown or updates the main phone number input value. You can set the manage-value property to override the default behavior and handle this action manually. The payload contains the concatenation of the country code and the phone number.

Input phone input

The user enters data in the field by typing or pasting text. The system does not validate the value or update the value property.Payload contains:

  • name: Value of the name property
  • data: Value entered in the field that caused the event to fire
  • fieldValue: Current value of the field when the event fired

Input phone button clicked

The user clicks the CTI (phone) button.

Input phone country code set

The user selects a country code from the dropdown. The payload contains the code value from the corresponding configuration object in the countryCodes array.

Search documentation
Search document titles and file paths on the brazil branch