# Javascript: TXTextControl.IfField.text Property

> Specifies the initial text of the field. Let this property be null to use the default text "IF".

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 25.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.IfField.text Property
- **172 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-iffield/text-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-iffield/text-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-iffield/text-property/llms-full.txt

---

### Description

Specifies the initial text of the field. Let this property be null to use the default text "IF".

### Syntax

```javascript
<string> TXTextControl.IfField.text
```

### Examples

The following example demonstrates `TXTextControl.IfField.text` in a practical document-editing workflow. It specifies the initial text of the field. Let this property be null to use the default text "IF".

```javascript
function inspectText(ifField) {
    const text = ifField.text;
    console.log("text:", text);
}
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.IfField.preserveFormatting Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-iffield/preserveformatting-property/llms-full.txt)
- **Next:** [Javascript: TXTextControl.IfField.trueText Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-iffield/truetext-property/llms-full.txt)
