Class ValidateFormFieldsArgs
This event arguments provides the necessary information about form validation.
Inherited Members
Namespace: Syncfusion.Blazor.SfPdfViewer
Assembly: Syncfusion.Blazor.SfPdfViewer.dll
Syntax
public class ValidateFormFieldsArgs : BaseEventArgs<ValidateFormFieldsArgs>
Constructors
ValidateFormFieldsArgs()
Declaration
public ValidateFormFieldsArgs()
Properties
DocumentName
Gets the document name to be loaded into PdfViewer.
Declaration
public string DocumentName { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value. |
Fields
Gets the collection of form fields to be validated in SfPdfViewer2 component.
Declaration
public List<FormFieldInfo> Fields { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<FormFieldInfo> | A list of FormFieldInfo objects representing the form fields to be validated. |
Remarks
This property provides a list of form fields that are part of the form validation process.
It is used within the ValidateFormFieldsArgs class.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents ValidateFormFields="@OnValidateFormFields"></PdfViewerEvents>
</SfPdfViewer2>
@code {
SfPdfViewer2 Viewer;
void OnValidateFormFields(ValidateFormFieldsArgs args)
{
List<FormFieldInfo> fields = args.Fields;
}
}
FormFields
The form fields object from PDF document being loaded.
Declaration
public List<FormField> FormFields { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<FormField> |
UnfilledFields
Gets a collection of form fields that have not been filled in the SfPdfViewer2 component.
Declaration
public Dictionary<string, object> UnfilledFields { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | A dictionary of form fields that are currently unfilled, where the key is the field name and the value is the default value of the form field. |
Remarks
This property retrieves a dictionary containing information about each form field that is currently unfilled.
It is part of the ValidateFormFieldsArgs class and is useful for validation purposes to ensure all necessary fields are completed.
Examples
<SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
<PdfViewerEvents ValidateFormFields="@OnValidateFormFields"></PdfViewerEvents>
</SfPdfViewer2>
@code {
SfPdfViewer2 Viewer;
void OnValidateFormFields(ValidateFormFieldsArgs args)
{
Dictionary<string, object> unfilledFields = args.UnFilledFields;
foreach (var field in unfilledFields)
{
Console.WriteLine($"Field Name: {field.Key}, Default Value: {field.Value}");
// Further processing of unfilled fields
}
}
}