CreateComboBoxForm

CreateComboBoxForm(oFormPr) → { ApiComboBoxForm }

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

Parameters:

Name Type Description
oFormPr ComboBoxFormPr

Combo box / dropdown list properties.

Returns:

Type
ApiComboBoxForm

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oComboBoxForm = Api.CreateComboBoxForm({"key": "Personal information", "tip": "Choose your country", "required": true, "placeholder": "Country", "editable": false, "autoFit": false, "items": ["Latvia", "USA", "UK"]});
var oParagraph = oDocument.GetElement(0);
oParagraph.AddElement(oComboBoxForm);
builder.SaveFile("docxf", "CreateComboBoxForm.docxf");
builder.CloseFile();

Resulting document