New to Telerik Document ProcessingStart a free 30-day trial

TextBoxField

Updated on Jun 3, 2026

The TextBoxField class corresponds to the FormFieldType.TextBox enum value and represents a text box data container. It represents a form field that accepts text input from users. It supports single-line and multiline text, password masking, and file selection.

Properties

The TextBoxField class 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 supports multiline text input.
IsPasswordIndicates whether the text input is a password field. When true, the viewer hides the entered characters.
IsFileSelectIndicates whether the field represents the path name of a file whose contents are submitted as the value of the field.
ShouldSpellCheckIndicates whether the text is 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.
MaxLengthOfInputCharactersGets or sets the maximum length of the entered 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
PropertiesSee Also
Not finding the help you need?
Contact Support