Skin form — Components tab — Controls — Autocomplete

Styles set here apply to text that the user enters in an Autocomplete input field.

An Autocomplete input field on a form supports user selection of a text value from a large list of candidate values. After the user types one or more characters, a filtered list of qualifying text values is displayed below the input field. The user can then select a value from this list.

The styles set here apply to both the standard and legacy Autocomplete controls. However, some styling elements are available only for the standard Autocomplete control. As a best practice, update legacy Autocomplete controls to standard Autocomplete controls. See Upgrading deprecated and outdated controls on the Pega Community.

You can modify the Standard style in the skin or create custom Autocomplete formats.

A preview of the currently selected format displays to the right. You can also preview formats by selecting Actions > Launch in the toolbar and then selecting one of the following preview options: Run Process, Open Portal, Harness Preview, UI Gallery Preview, Skin Preview.

Text

Settings that you specify in this section apply to the text that the user enters in the Autocomplete input box.

Use mixin
Mixin overrides
Click Add mixin override to override a style that is set by the mixin:
Font
Select the font family. The font family defaults to (use overall), which is the font that you specified in the Overall Font field at the top of the Mixins tab.
Font Size
Select the font size in pixels (px), points (pts), em (the current font size), or percentage (%).
Color
Enter a hexadecimal value (such as #3d3d3d), or click the box next to the field to choose a color.
Font Weight
Select a font weight from the list.
Text Decoration
Select a text decoration option from the list. For example: Underline. A blank selection indicates that no additional attributes are applied.
Transform Text
Select a text transformation option from the list. Ffor example: Lowercase. A blank selection indicates that no additional attributes are applied.
Additional styles
You can apply additional styles, specific to styling the text for this element, by specifying a CSS attribute and value. You must specify a CSS attribute that is related to text styles. Click Add additional styles to define another CSS attribute-value pair.
Specify styles Select this check box to define a custom text format:
Font
Select the font family. The font family defaults to (use overall) , which is the font that you specified in the Overall Font field at the top of the Mixins tab.
Font Size
Select the font size in pixels (px), points (pts), em (the current font size), or percentage (%).
Color
Enter a hexadecimal value (such as #3d3d3d), or click the box next to the field to choose a color.
Font Weight
Select a font weight from the list.
Text Decoration
Select a text decoration option from the list, for example, Underline. The blank selection is the default selection for backward compatibility and indicates that no additional attributes are applied.
Transform Text
Select a text transformation option from the list, for example, Lowercase. The blank selection is the default selection for backward compatibility and indicates that no additional attributes are applied.
  • Additional styles — Apply additional styles, specific to styling the text for this element, by specifying a CSS attribute and value. You must specify a CSS attribute that is related to text styles. Click Add additional styles to define another CSS attribute-value pair.

Border

Settings in this section apply to the border of the Autocomplete input box.

Use mixin

You can specify the Top , Left , Right , or Bottom border as none, solid, dashed, or dotted, rather than inheriting the style from the selected mixin.

Specify styles

You can specify a custom border by selecting or clearing the Apply to all sides check box:

  • When selected, you can choose the same border style, pixel width, and color for the top, right, bottom, and left borders.
  • When cleared, you can choose a border style, pixel width, and color for the top, right, bottom, and left borders individually.

The following border styles are available:

  • none
  • solid
  • dashed
  • dotted

Background

Settings in this section apply to the background of the Autocomplete input box.

Use mixin  
Specify styles Select this check box to define a custom background:

Select the background Type:

none
Indicates no background color, similar to setting a transparent background.
solid
Enter a hexadecimal value (such as #3d3d3d), or click the box next to the Color field to choose a color.
gradient
Select the Direction in which you want to blend the background colors (horizontal or vertical. Specify the Start and Stop colors of the gradient. Specify a Backup color, in the event that the browser cannot render the gradient.
image
Select a background image by specifying the following options:
Background color
To use the background color specified in a mixin, choose obtained from mixin and then click the gear icon to select the mixin. Alternatively, you can select custom color and enter the CSS hexadecimal value or click the box next to the field to choose a color.
Location
Enter the location of the file, including the relative path. For example, images/AlphaCorpLogo.png.
Tile
Specify tile settings for the image.
  • If you want to use a single image, select None.
  • If you want a row of images in the background, select Horizontal.
  • If you want a column of images in the background, select Vertical.
  • If you want rows and columns containing the image in the background, select Both.
Position
Specify the placement of the starting tiled image, for example: top left.
Additional styles
You can apply additional styles, specific to styling the text for this element, by specifying a CSS attribute and value. You must specify a CSS attribute that is related to background styles. Click Add additional styles to define another CSS attribute-value pair.

Autocomplete states

Use the options in this section to style the control based on its state. You can style the control differently when it is in one of the following states:
  • :hover – State of the control when a user points to the control or rests the pointer on the control.
  • :focus – State of the control when the field is in focus, for example, the state of a text field when it is ready to accept inputs.
  • :active – State of the control when the field is ready to be activated, for example, when a user has clicked the control but has not yet released the mouse button.
You can apply different styles for different states by using one of the following styles. To use the same style for all states, select the Use same styles for hover, focus and active check box.
  • Auto – Select this option to apply auto-generated styles for the control in this state. These styles are generated based on the applied control format and the mixins defined within the format.
  • Default – Select this option to apply the default browser styles for the states instead of generating the styles based on a skin or defined CSS in the application.
  • Custom – Select this option to define your own styles for the element in this state.

Creating a custom Autocomplete format

  1. Click Add a format.
  2. In the Create a new format dialog box, enter the Format name by using only alphanumeric characters (a-z and 0-9) and spaces. The name cannot begin with a number. The format name that you enter is converted into the name CSS class or classes.
  3. Optional: Provide a Usage annotation.
  4. Click OK. The new format is populated with default values.

Applying a custom Autocomplete format

  1. In the cell containing the Autocomplete control, click the View properties icon to open the Cell Properties panel.
  2. On the Presentation tab, press the down arrow in the Style field to select the custom format that you want to use.