편집

다음을 통해 공유


Controls (Client API reference)

A control represents an HTML element present on the form. Some controls are bound to a specific column, whereas others might represent unbound controls such as an IFRAME, web resource, or a subgrid added to the form.

The control object provides methods to change the presentation or behavior of a control and identify the corresponding column. You access controls using one of the following collections:

  • formContext.ui.controls
  • formContext.ui Section.controls
  • formContext.data.entity Attribute.controls

The formContext.getControl method is a shortcut method to access formContext.ui.controls.get.

Controls are categorized by type. You can determine the type of a control by using the getControlType method. Certain control methods are only available for specific types of controls.

This article provides information about the methods available per control type.

Standard control type

These are the methods available for a Standard control.

 

The following methods for the Standard control are deprecated in this release: addOnKeyPress, fireOnKeyPress, and removeOnKeyPress.

IFRAME control type

These methods are available for an IFRAME control.

 

Kbsearch (Knowledge base search) control type

These methods are available for knowledge base search control.

Note

When the knowledge base search control is added to the social pane, the name of the control will be searchwidgetcontrol_notescontrol. This name can't be changed.

Lookup control type

These methods are available for a lookup control.

Choices and choice control types

Both choices and choice controls have the same set of methods available.

 

 

Quickform control type

See formContext.ui.quickForms for information about methods supported for this control type.

Subgrid control type

See Grids and subgrids for information methods supported for this control type.

Timelinewall control type

The timeline control presents the Posts, Activities, and Notes in a unified view. These methods are available for this control type.

 

Timer control type

These methods are available for the timer control.

Web resource control type

A web resource control has the same set of methods available as the iframe control. See iframe control type

The Silverlight web resource has these extra methods:

Tip

If you want to modify all the controls bound to a column on a form, use the controls collection inside the column type. For example, to add notification to each control bound to the name column, you can do the following:

 const notification = { messages: ['Sample Notification on Name Controls'], notificationLevel: 'RECOMMENDATION', uniqueId: 'my_unique_id'};
formContext.getAttribute("name").controls.forEach(control => control.addNotification(notification));

Form component control type

A form component control type has the same set of methods available as the formContext on a main form. See Form component behavior > Client API

Columns