New to Telerik Document ProcessingStart a free 30-day trial

TextBoxField Class

Updated on May 11, 2026

This article describes the following topics:

Overview

This class corresponds to FormFieldType.TextBox enum value and represents a TextBox data container.

Properties

TextBoxField exposes the following properties:

PropertyDescription
ValueGets or sets the current text value of the field.
DefaultValueGets or sets the default value used when the AcroForm is reset to its default values.
WidgetsThe collection of Widget annotations representing the field on the PDF pages. Widgets can be added using AddWidget() and removed using Remove(). Implements IEnumerable.
IsMultilineIndicates whether the text box should support multiline text input.
IsPasswordIndicates whether the text input is a password field. When true, the viewer hides the inputted characters.
IsFileSelectIndicates whether the field represents the path name of a file whose contents are to be submitted as the value of the field.
ShouldSpellCheckIndicates whether the text should be spell checked during input.
AllowScrollIndicates whether scrolling is allowed for larger text content. When false, the maximum text input is restricted to the Widget annotation rectangle.
MaxLengthOfInputCharactersSpecifies the maximum length of the inputted text. When null, the text length is unrestricted.

Example 1: Create a TextBoxField and add it to a page

C#
RadFixedDocument fixedDocument = new RadFixedDocument();
fixedDocument.Pages.AddPage();

TextBoxField textField = new TextBoxField("SampleTextBox")
{
	MaxLengthOfInputCharacters = 500,
	IsMultiline = true,
	IsPassword = false,
	IsFileSelect = false,
	ShouldSpellCheck = true,
	AllowScroll = true,
	Value = "Sample content",
};

VariableContentWidget widget = textField.Widgets.AddWidget();
widget.Rect = new Rect(0, 0, 250, 50);
widget.RecalculateContent();

fixedDocument.AcroForm.FormFields.Add(textField);
fixedDocument.Pages[0].Annotations.Add(widget);

In .NET Standard use Telerik.Documents.Primitives.Rect instead of System.Windows.Rect.

See Also

In this article
OverviewPropertiesSee Also
Not finding the help you need?
Contact Support