Javascript: SelectionFormField.getItems Method
Description
Gets a list of items for the SelectionFormField. An item must not be an empty string.
Syntax
<void> SelectionFormField.getItems(<RequestStringsCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the index of the selected item. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates SelectionFormField.getItems in a practical document-editing workflow. It gets a list of items for the SelectionFormField. An item must not be an empty string.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectItems(selectionFormField) {
selectionFormField.getItems(
function(result) {
console.log("get items result:", result);
},
onTxError
);
}