SetListValues
Sets the list values to the current combo box.
Syntax
expression.SetListValues(aListString);
expression
- A variable that represents a ApiComboBoxForm class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
aListString | Required | string[] | The combo box list values. |
Returns
boolean
Example
This example sets the list values to the current combo box.
let doc = Api.GetDocument();
let comboBoxForm = Api.CreateComboBoxForm({"key": "Personal information", "tip": "Choose your country", "required": true, "placeholder": "Country", "editable": false, "autoFit": false});
let paragraph = doc.GetElement(0);
paragraph.AddElement(comboBoxForm);
comboBoxForm.SetListValues(["Latvia", "USA", "UK"]);