Skip to main content

AddDropDownListContentControl

Adds a new drop-down list content control to the document.

Syntax

expression.AddDropDownListContentControl(list, selected);

expression - A variable that represents a ApiDocument class.

Parameters

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

Returns

ApiInlineLvlSdt

Example

Add a dropdown list content control to a document in a document.

// How do I add the drop down list content control in a document?

// Add the drop down list content control using a document object.

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