Get Started
Usage API
More information

CreateComboBoxForm

CreateComboBoxForm(oFormPr) → { ApiComboBoxForm }

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

Parameters:

Name Type Description
oFormPr ComboBoxFormPr

Combo box/dropdown form properties.

Returns:

Type
ApiComboBoxForm

Example

Copy code
builder.CreateFile("docxf");
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