跳到主要内容

CreateComboBoxForm

Creates a combo box / dropdown list with the specified combo box / dropdown list properties.

Syntax

expression.CreateComboBoxForm(formPr);

expression - A variable that represents a Api class.

Parameters

NameRequired/OptionalData typeDefaultDescription
formPrRequiredComboBoxFormPrCombo box / dropdown list properties.

Returns

ApiComboBoxForm

Example

This example creates a combo box form with the common and specific combo box form properties.

// How to create a combo box form and add it to the paragraph.

// Add a combo box with the state options to the ApiDocument object.

let doc = Api.GetDocument();
let comboBoxForm = Api.CreateComboBoxForm({
"key": "Personal information",
"tip": "Choose your country",
"required": true,
"placeholder": "Country",
"editable": false,
"autoFit": false,
"items": ["Latvia", "USA", "UK"]
});
let paragraph = doc.GetElement(0);
paragraph.AddElement(comboBoxForm);