# Javascript: Signatures.setBeforeSubmitCallback Method

> Sets the callback invoked before submission.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 30.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API - Document Viewer > Javascript: Signatures.setBeforeSubmitCallback Method
- **241 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript-document-viewer/signatures/setbeforesubmitcallback-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript-document-viewer/signatures/setbeforesubmitcallback-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript-document-viewer/signatures/setbeforesubmitcallback-method/llms-full.txt

---

### Description

Sets the callback invoked before submission.

### Syntax

```javascript
<void> Signatures.setBeforeSubmitCallback(<SignatureBeforeSubmitCallback> callback)
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Handler invoked immediately before submission. |

### Return Value

Sets the callback invoked before submission.

### Examples

The following example demonstrates `signatures.setBeforeSubmitCallback` in a practical Document Viewer workflow. Sets a callback function which will be invoked on submitting the document.

```javascript
TXDocumentViewer.signatures.setBeforeSubmitCallback(function(signatureData) {
    console.log("Preparing signature submission for:", signatureData);
});
```

---

## Nearby

- **Previous:** [Javascript: Signatures.retrieveSignature Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript-document-viewer/signatures/retrievesignature-method/llms-full.txt)
- **Next:** [Javascript: Signatures.setCustomSigning Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript-document-viewer/signatures/setcustomsigning-method/llms-full.txt)
