Interface IFormFieldObject
Form field object
Inherited Members
Namespace: IronSoftware.Forms
Assembly: IronPdf.dll
Syntax
public interface IFormFieldObject : IPdfDocumentObject, IPdfDocumentObject, IDocumentObject
Reading a fillable PDF form field's name or writing its value in IronPDF, independent of where the field sits on the page, runs through IFormFieldObject. It declares the property surface that identifies a field and carries its current value. The contract is one of three composed into IFormField; the other two, IFormFieldAnnotationObject and IPdfDocumentObject, cover geometry and document identity respectively.
This interface matters because every concrete form field that IronPDF exposes inherits its data members from IFormFieldObject. TextFormField, CheckboxFormField, ComboboxFormField, RadioFormField, SignatureFormField, and ImageFormField all implement IFormField, which means they pick up the IFormFieldObject surface by inheritance. Code that reads field names, writes values, or audits form state can rely on these properties without casting to a concrete type.
The headline data members fall into three groups. For identity, read Name (the local field name) or FullName (the dotted, fully-qualified name); both are settable but FullName is usually the form-design identifier. For state, assign Value to fill a text, choice, or checkbox field, check ReadOnly first, and respect MaxLength for text fields. For type discovery, inspect FormType (string label) or Type (the PdfFormFieldType enum), and use Choices to enumerate valid options on combo-box and radio fields. Reading a name and writing a value on a loaded document is demonstrated in the edit PDF forms how-to.
using IronPdf;
using IronSoftware.Forms;
PdfDocument pdf = PdfDocument.FromFile("application.pdf");
// FindFormField returns IFormField, which inherits the IFormFieldObject surface.
IFormField field = pdf.Form.FindFormField("FullName");
if (field != null && !field.ReadOnly)
{
// Identity, state, and type discovery, all from IFormFieldObject.
string id = field.FullName;
string kind = field.FormType;
if (field.MaxLength == 0 || "Jane Doe".Length <= field.MaxLength)
{
field.Value = "Jane Doe";
}
}
pdf.SaveAs("application-filled.pdf");Splitting these data members onto a distinct contract lets IronPDF expose the same field-level surface across multiple consumer types without forcing every consumer to handle annotation geometry. For building fillable PDFs from scratch with these same data members, see the create PDF forms how-to.
Properties
Annotations
Form field annotations
Declaration
List<IFormFieldAnnotation> Annotations { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<IFormFieldAnnotation> |
Choices
Selection choices
Declaration
List<string> Choices { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.String> |
DefaultAppearance
Default appearance string
Declaration
string DefaultAppearance { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
FormFlags
Form field flags
Declaration
PdfFormFieldFlags FormFlags { get; }
Property Value
| Type | Description |
|---|---|
| PdfFormFieldFlags |
FormType
Form type
Declaration
string FormType { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
FullName
Fully qualified name
Declaration
string FullName { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
MaxLength
Maximum number of characters which can be specified in the value
Declaration
int MaxLength { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Name
Partial name
Declaration
string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ObjType
Object type
Declaration
string ObjType { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ReadOnly
True if read-only
Declaration
bool ReadOnly { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
RichText
Form value using rich text
Declaration
string RichText { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Type
Pdf form field type
Declaration
PdfFormFieldType Type { get; }
Property Value
| Type | Description |
|---|---|
| PdfFormFieldType |
Value
Form value
Declaration
string Value { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |