# Javascript: SignatureFieldCollection.getItem Method

> Gets the signature field selected by the user or the signature field with the specified identifier.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 31.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: SignatureFieldCollection.getItem Method
- **426 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/signaturefieldcollection/getitem-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/signaturefieldcollection/getitem-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/signaturefieldcollection/getitem-method/llms-full.txt

---

### Description

Gets the signature field selected by the user or the signature field with the specified identifier.

### Syntax

```javascript
<void> SignatureFieldCollection.getItem(<RequestSignatureFieldCallback> callback, [<ErrorCallback> errorCallback], [<number> id])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the requested signature field or null if there is no signature field at the current input position / with the specified identifier. |
| errorCallback | Optional. Is called when the operation failed with an error. |
| id | Optional. The signature field's identifier. |

### Examples

The following example demonstrates `SignatureFieldCollection.getItem` in a practical document-editing workflow. It gets the signature field selected by the user or the signature field with the specified identifier.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.signatureFields.getItem(
    function(signatureField) {
        if (!signatureField) {
            console.warn("No signature field was returned.");
            return;
        }
        
        console.log("get item result:", signatureField);
    },
    onTxError,
    25
);
```

---

## Nearby

- **Previous:** [Javascript: SignatureFieldCollection.addWithMouse Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/signaturefieldcollection/addwithmouse-method/llms-full.txt)
- **Next:** [Javascript: SignatureFieldCollection.getItemByName Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/signaturefieldcollection/getitembyname-method/llms-full.txt)
