Phone input

Phone inputs allow for users to enter and edit phone numbers, typically in a form. There is masking support for phone numbers with a +1 country code (USA).

Usage

Phone inputs will accept numbers only and use built-in Validation for telephone numbers. If an invalid phone number is entered, an error will be displayed when the user submits.

For more best practices on building forms with inputs in Constellation, visit Pega Academy.

Example

Phone input
Enter a phone number

Display options

Required

Marking a phone input field as required will prevent form submission until the required phone input is complete.

Disabled

You may wish to disable a phone input field in order to prevent a user from entering or editing any information while some task is being completed, or to restrict a user's access.

Readonly

Marking a field as readonly will render information that has already been entered for viewing purposes only. The user will not be able to edit the phone input if it is readonly.

Displaying non-editable data

There are two methods of displaying non-editable information in Constellation: as a readonly field or a field-value list. The method used depends on the context and purpose of the information.

Readonly

Display a field as readonly to indicate that a user cannot edit a field due to form conditionality or role restrictions. This way, the field can be editable when certain conditions are met.

You can also display a field as readonly when doing so gives the user context, or completes the layout for a set of fields in a form. For example, in a set of address input fields, the “state” field may be readonly, while the “address”, “city”, and “zip code” fields may be editable.

Field-value list

Field-value lists also display non-editable information, but live outside of a form (often in a case's summary panel or details tab card). Display information in a field-value list when users need to reference the information to complete a form or review the information to verify form details.

Previously, in classic Pega, field-value list was referred to as "readonly". This was changed due to "readonly" being an HTML input attribute.

Configuration

To learn how to configure this component in your Constellation application, visit Pega Documentation.

All components shown on this site are supported by the Constellation design system. To learn how to configure Theme Cosmos, visit Pega Documentation.

Related components