SelectListValue
Selects the specified value from the combo box list values.
Syntax
expression.SelectListValue(sValue);
expression
- A variable that represents a ApiComboBoxForm class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
sValue | Required | string | The combo box list value that will be selected. |
Returns
boolean
Example
This example elects the specified value from the combo box list values.
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);
comboBoxForm.SelectListValue("USA");