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/read-form-field-values.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ This guide shows common patterns with concise code snippets you can copy into yo
16
16
17
17
## Access the Form Field Collection
18
18
19
-
Get all available form field ata by reading viewer's `formFieldCollections`. For more information, see [`formFieldCollections`](./form-fields-api#formfieldcollections).
19
+
Get all available form field data by reading viewer's `formFieldCollections`. For more information, see [`formFieldCollections`](./form-fields-api#formfieldcollections).
20
20
21
21
```ts
22
22
const formFields =viewer.formFieldCollections;
@@ -91,7 +91,7 @@ viewer.documentLoaded = () => {
91
91
## Use Cases
92
92
93
93
- Validate and pre-fill form fields in your application before user submission.
94
-
- Submit filled form data from the viewer to a backend service for processing or storage.
94
+
- Submit filled form data from the viewer to a back end service for processing or storage.
95
95
- Synchronize form field values with external UI components to keep application state in sync.
96
96
- Export form data for reporting, archival, or integration with other systems.
Copy file name to clipboardExpand all lines: Document-Processing/PDF/PDF-Viewer/react/forms/submit-form-data.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ domainurl: ##DomainURL##
12
12
13
13
## Overview
14
14
15
-
The React PDF Viewer allows submitting filled form data like text fields, checkboxes, radio buttons and dropdown values to a backend server for processing. This guide shows how to extract form data from the viewer and **post** it as `JSON` to a server endpoint.
15
+
The React PDF Viewer allows submitting filled form data like text fields, checkboxes, radio buttons and dropdown values to a back end server for processing. This guide shows how to extract form data from the viewer and **post** it as `JSON` to a server endpoint.
16
16
17
17
## Prerequisites
18
18
@@ -31,9 +31,9 @@ The React PDF Viewer allows submitting filled form data like text fields, checkb
31
31
32
32
- Use `viewer.exportFormFieldsAsObject()` to obtain the filled values as JSON.
33
33
34
-
3. POST the exported JSON to your backend
34
+
3. POST the exported JSON to your back end
35
35
36
-
- Use `fetch`or `axios`to send the JSON. The server must accept `application/json` and handle CORS if cross-domain.
36
+
- Use `fetch` to send the JSON. The server must accept `application/json` and handle CORS if cross-domain.
37
37
38
38
4. Trigger submission from a UI action
39
39
@@ -104,15 +104,15 @@ export default function SubmitFormExample() {
104
104
## Troubleshooting
105
105
106
106
-**No form values returned**: Ensure the PDF has interactive fields and the viewer has finished loading before calling `exportFormFieldsAsObject()`.
107
-
-**CORS errors**: Enable CORS on the server or serve both frontend and backend from the same origin during testing.
107
+
-**CORS errors**: Enable CORS on the server or serve both frontend and back end from the same origin during testing.
108
108
-**Server rejects payload**: Confirm the server expects `application/json` and validates shape of the object.
109
109
-**WASM or resource errors**: Ensure `resourceUrl` points to the correct Syncfusion PDF Viewer library files.
110
110
111
111
## Use cases
112
112
113
-
- Enable remote verification and approval workflows by sending submitted form data to a backend service for review and sign-off.
113
+
- Enable remote verification and approval workflows by sending submitted form data to a back end service for review and sign-off.
114
114
- Store submitted form responses in a database to persist user inputs for auditing, reporting, or later retrieval.
115
-
- Trigger workflow automation and downstream processing by sending form data to business systems or serverless functions.
115
+
- Trigger workflow automation and downstream processing by sending form data to business systems or server less functions.
116
116
- Merge submitted values into a final flattened PDF on the server to produce a non-editable document that combines the form data with the original PDF.
0 commit comments