SetListValues

SetListValues(aListString) → { boolean }

Sets the list values to the current combo box.

Parameters:

Name Type Description
aListString Array.<string>

The combo box list values.

Returns:

Type
boolean

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});
var oParagraph = oDocument.GetElement(0);
oParagraph.AddElement(oComboBoxForm);
oComboBoxForm.SetListValues(["Latvia", "USA", "UK"]);
builder.SaveFile("docx", "SetListValues.docx");
builder.CloseFile();

Resulting document