# Javascript: TextField.setDoubledInputPosition Method

> Gets whether a text field has a doubled input position in front of its first character and behind its last character.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TextField.setDoubledInputPosition Method
- **413 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textfield/setdoubledinputposition-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textfield/setdoubledinputposition-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/textfield/setdoubledinputposition-method/llms-full.txt

---

### Description

Gets whether a text field has a doubled input position in front of its first character and behind its last character.

### Syntax

```javascript
<void> TextField.setDoubledInputPosition(<boolean> doubledInputPosition, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| doubledInputPosition | Specifies whether a text field has a doubled input position in front of its first character and behind its last character. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TextField.setDoubledInputPosition` in a practical document-editing workflow. It gets whether a text field has a doubled input position in front of its first character and behind its last character.

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

function configureDoubledInputPosition(textField) {
    textField.setDoubledInputPosition(
        true,
        function() {
            console.log("set doubled input position completed.");
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TextField.setDeleteable Method](https://docs.textcontrol.com/ds-server/reference/javascript/textfield/setdeleteable-method/llms-full.txt)
- **Next:** [Javascript: TextField.setEditable Method](https://docs.textcontrol.com/ds-server/reference/javascript/textfield/seteditable-method/llms-full.txt)
