Skip to main content

AddComboBoxContentControl

Adds a new combo box content control to the document.

Syntax

expression.AddComboBoxContentControl(list, selected);

expression - A variable that represents a ApiDocument class.

Parameters

NameRequired/OptionalData typeDefaultDescription
listOptionalContentControlListItem[]An array of objects representing the items in the combo box.
selectedOptionalstringThe optional value of the item that should be selected by default (must match one of the ListItem.Value).

Returns

ApiInlineLvlSdt

Example

Add a combo box content control to a document.

// How do I insert a combo box content control in a document?

// Provide users with a selectable dropdown list by inserting a combo box field in a document.

let doc = Api.GetDocument();
doc.AddComboBoxContentControl();