# Javascript: SignatureFieldCollection.getItemByName Method

> Gets the signature field with the specified name.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 31.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: SignatureFieldCollection.getItemByName Method
- **405 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/signaturefieldcollection/getitembyname-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/signaturefieldcollection/getitembyname-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/signaturefieldcollection/getitembyname-method/llms-full.txt

---

### Description

Gets the signature field with the specified name.

### Syntax

```javascript
<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.

```javascript
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"
);
```

---

## Nearby

- **Previous:** [Javascript: SignatureFieldCollection.getItem Method](https://docs.textcontrol.com/ds-server/reference/javascript/signaturefieldcollection/getitem-method/llms-full.txt)
- **Next:** [Javascript: SignatureFieldCollection.remove Method](https://docs.textcontrol.com/ds-server/reference/javascript/signaturefieldcollection/remove-method/llms-full.txt)
