Javascript: CheckFormField.setChecked Method
Description
Sets a value indicating whether the checkbox is in the checked state.
Syntax
<void> CheckFormField.setChecked(<Boolean> isChecked, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| isChecked | A value indicating whether the checkbox is in the checked state. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates CheckFormField.setChecked in a practical document-editing workflow. It sets a value indicating whether the checkbox is in the checked state.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureChecked(checkFormField) {
checkFormField.setChecked(
true,
function() {
console.log("set checked completed.");
},
onTxError
);
}