Back to Devexpress

PdfAcroFormFacade.GetFormField(String) Method

officefileapi-devexpress-dot-pdf-dot-pdfacroformfacade-dot-getformfield-x28-system-dot-string-x29.md

latest3.1 KB
Original Source

PdfAcroFormFacade.GetFormField(String) Method

Gets a specific form field’s properties.

Namespace : DevExpress.Pdf

Assembly : DevExpress.Pdf.v25.2.Core.dll

NuGet Package : DevExpress.Pdf.Core

Declaration

csharp
public PdfFormFieldFacade GetFormField(
    string fullName
)
vb
Public Function GetFormField(
    fullName As String
) As PdfFormFieldFacade

Parameters

NameTypeDescription
fullNameString

A form field’s name.

|

Returns

TypeDescription
PdfFormFieldFacade

An object that contains the form field’s properties.

|

Remarks

Use one of the PdfAcroFormFacade.Get…FormField methods to obtain a specific form field type’s properties.

Use the PdfAcroFormFacade.GetFields() method to obtain a list of all AcroForm fields. The PdfAcroFormFacade.GetNames() method gets a list of form field names.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetFormField(String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

pdf-document-api-replace-form-field-with-image/CS/ReplaceFormFieldWithImage/Program.cs#L19

csharp
string fieldName = "Address";
PdfTextFormFieldFacade? formField = acroForm.GetFormField(fieldName) as PdfTextFormFieldFacade;
if (formField == null) return;

pdf-document-api-replace-form-field-with-image/VB/ReplaceFormFieldWithImage/Program.vb#L19

vb
Dim fieldName As String = "Address"
Dim formField As PdfTextFormFieldFacade = TryCast(acroForm.GetFormField(fieldName), PdfTextFormFieldFacade)
If formField Is Nothing Then Return

See Also

PdfAcroFormFacade Class

PdfAcroFormFacade Members

DevExpress.Pdf Namespace