Javascript: SignatureFieldCollection.getItemByName Method
Description
Gets the signature field with the specified name.
Syntax
<void> SignatureFieldCollection.getItemByName(<RequestSignatureFieldCallback> callback, [<ErrorCallback> errorCallback], <string> name)Parameters
| Parameter | Description |
|---|---|
| callback | Receives the requested signature field or null if no signature field with the specified name exists. |
| errorCallback | Optional. Is called when the operation failed with an error. |
| name | The signature field's name. |
Examples
The following example demonstrates SignatureFieldCollection.getItemByName in a practical document-editing workflow. It gets the signature field with the specified name.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.signatureFields.getItemByName(
function(signatureField) {
if (!signatureField) {
console.warn("No signature field was returned.");
return;
}
console.log("get item by name result:", signatureField);
},
onTxError,
"InvoiceNumber"
);