You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Document-Processing/PDF/PDF-Viewer/react/forms/form-field-events.md
+19-29Lines changed: 19 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,41 +10,31 @@ domainurl: ##DomainURL##
10
10
11
11
# PDF Viewer Form Field Events in React
12
12
13
-
The Syncfusion React PDF Viewer exposes form field events that let developers track user interactions, respond to changes, and implement business logic. These events support validation, UI updates, logging, and workflow automation. Form field events occur when fields are added, selected, edited, moved, resized, or removed.
13
+
The Syncfusion React PDF Viewer provides a set of form field events that report changes associated with creating, selecting, modifying, moving, resizing, or removing form fields. These events supply metadata related to the affected field and are raised during user interaction or programmatic updates.
14
14
15
-
The example below shows wiring of form-field events and a validation handler that prevents print/download when required fields are missing.
15
+
Validation‑related events are emitted when the viewer performs operations that require confirmation of field completion, such as print or download actions.
16
16
17
17
## Supported PDF Form Field Events
18
18
19
19
The following table lists all supported form field events and their descriptions:
20
20
21
-
| Form Field events | Description |
22
-
|---|---|
23
-
|[formFieldAdd](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldAddArgs)| Triggered when a new form field is added, either through the Form Designer UI or programmatically. |
24
-
|[formFieldClick](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldClickArgs)| Fired when a form field is clicked in the viewer. |
25
-
|[formFieldDoubleClick](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldDoubleClickArgs)| Fired when a form field is double clicked. |
26
-
|[formFieldFocusOut](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldFocusOutEventArgs)| Triggered when a form field loses focus after editing. |
27
-
|[formFieldMouseLeave](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldMouseLeaveArgs)| Fired when the mouse pointer leaves a form field. |
28
-
|[formFieldMouseOver](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldMouseoverArgs)| Fired when the mouse pointer moves over a form field. |
29
-
|[formFieldMove](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldMoveArgs)| Triggered when a form field is moved to a new position. |
30
-
|[formFieldPropertiesChange](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldPropertiesChangeArgs)| Fired when any form field property changes, such as font, color, or constraint values. |
31
-
|[formFieldRemove](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldRemoveArgs)| Triggered when a form field is deleted from the document. |
32
-
|[formFieldResize](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldResizeArgs)| Fired when a form field is resized. |
33
-
|[formFieldSelect](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldSelectArgs)| Fired when a form field is selected in the Form Designer. |
34
-
|[formFieldUnselect](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldUnselectArgs)| Fired when a previously selected form field is unselected. |
35
-
|[validateFormFields](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/validateFormFieldsArgs)| Fired when form field validation fails during print or download actions. |
36
-
37
-
**Common Use Cases**
38
-
39
-
Form field events can be used to:
40
-
- Validate form data before printing or downloading
41
-
- Track user interaction with form fields
42
-
- Update UI elements dynamically
43
-
- Log form changes for auditing
44
-
- Trigger workflow actions based on field changes
45
-
- Enforce business rules during form editing
46
-
47
-
## Handle PDF Form Field Events
21
+
| Form Field events | Description | Arguments |
22
+
|---|---|---|
23
+
|[`formFieldAdd`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldadd)| Triggered when a new form field is added, either through the Form Designer UI or programmatically. |[`formFieldAddArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldAddArgs)|
24
+
|[`formFieldClick`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldclick)| Fired when a form field is clicked in the viewer. |[`formFieldClickArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldClickArgs)|
25
+
|[`formFieldDoubleClick`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfielddoubleclick)| Fired when a form field is double clicked. |[`formFieldDoubleClickArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldDoubleClickArgs)|
26
+
|[`formFieldFocusOut`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldfocusout)| Triggered when a form field loses focus after editing. |[`formFieldFocusOutEventArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldFocusOutEventArgs)|
27
+
|[`formFieldMouseLeave`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldmouseleave)| Fired when the mouse pointer leaves a form field. |[`formFieldMouseLeaveArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldMouseLeaveArgs)|
28
+
|[`formFieldMouseOver`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldmouseover)| Fired when the mouse pointer moves over a form field. |[`formFieldMouseOverArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldMouseoverArgs)|
29
+
|[`formFieldMove`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldmove)| Triggered when a form field is moved to a new position. |[`formFieldMoveArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldmove)|
30
+
|[`formFieldPropertiesChange`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldpropertieschange)| Fired when any form field property changes, such as font, color, or constraint values. |[`formFieldPropertiesChangeArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldPropertiesChangeArgs)|
31
+
|[`formFieldRemove`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldremove)| Triggered when a form field is deleted from the document. |[`formFieldRemoveArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldRemoveArgs)|
32
+
|[`formFieldResize`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldresize)| Fired when a form field is resized. |[`formFieldResizeArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldResizeArgs)|
33
+
|[`formFieldSelect`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldselect)| Fired when a form field is selected in the Form Designer. |[`formFieldSelectArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldSelectArgs)|
34
+
|[`formFieldUnselect`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#formfieldunselect)| Fired when a previously selected form field is unselected. |[`formFieldUnselectArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/formFieldUnselectArgs)|
35
+
|[`validateFormFields`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#validateformfields)| Fired when form field validation fails during print or download actions. |[`validateFormFieldsArgs`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/validateFormFieldsArgs)|
36
+
37
+
## Example
48
38
49
39
You can wire up form field events on the PDF Viewer instance to execute custom logic when specific actions occur.
0 commit comments