---
title: "Submit and save PDF form using JavaScript | Nutrient SDK"
canonical_url: "https://www.nutrient.io/guides/web/forms/submit-or-save/to-server-backed/"
md_url: "https://www.nutrient.io/guides/web/forms/submit-or-save/to-server-backed.md"
last_updated: "2026-06-19T09:21:00.333Z"
description: "Use this guide when your browser form workflow needs server-backed persistence with Document Engine, especially for multiuser or cross-session continuity."
---

# Submit and save PDF forms using Document Engine

When you use Nutrient Web SDK with [Document Engine](https://www.nutrient.io/guides/web/about/operational-modes.md), whenever a form field is filled in, the new value is automatically sent and stored by Document Engine. The exact moment of when the changes are sent to Document Engine can be controlled by changing the [autosaving mode](https://www.nutrient.io/guides/web/annotations/annotation-saving-mechanism.md).

Use this approach when your form workflow needs server-backed persistence and continuity across users, sessions, or devices.

For browser-authored form templates, pair this with the [building a browser form template builder](https://www.nutrient.io/guides/web/forms/browser-form-template-builder.md) and [PDF form data formats](https://www.nutrient.io/guides/web/forms/introduction-to-forms/data-formats.md) guides.

If you use [Instant](https://www.nutrient.io/guides/web/instant-synchronization.md), whenever any of the connected clients fills in the form field, the change is automatically synchronized to all the other connected clients.

Using Web SDK with Document Engine, you can also fill the form fields with values coming from any source — e.g. a database or your backend application — using Document Engine’s [forms API](https://www.nutrient.io/api/reference/document-engine/upstream/). For example, assuming there are form fields called `firstNameField` and `lastNameField` in the document, you can set their values using the following HTTP request:

### SHELL

```shell

curl -X POST http://localhost:5000/api/documents/your-document-id/form-field-values \
  -H "Authorization: Token token=<secret token>" \
  -H "Content-Type: application/json" \
  -d '{
  "formFieldValues": [
    {
      "name": "firstNameField",
      "value": "John"
    },
    {
      "name": "lastNameField",
      "value": "Appleseed"
    }
  ]
}'

```

### HTTP

```http

POST /api/documents/your-document-id/form-field-values HTTP/1.1
Content-Type: application/json
Authorization: Token token=<secret token>

{
  "formFieldValues": [
    {
      "name": "firstNameField",
      "value": "John"
    },
    {
      "name": "lastNameField",
      "value": "Appleseed"
    }
  ]
}

```

After the request succeeds, any [client opening that document from Document Engine](https://www.nutrient.io/guides/web/open-a-document/from-document-engine.md) will see that the form fields have these values. Moreover, any clients that are connected with [Instant](https://www.nutrient.io/guides/web/instant-synchronization.md) enabled will see the values update in real time.
---

## Related pages

- [Autosaving changes made to PDF forms](/guides/web/forms/submit-or-save/auto-save.md)
- [Embed data into PDF forms using JavaScript](/guides/web/forms/submit-or-save/embed-data-into-pdf.md)
- [Submit and save PDF forms to an external source](/guides/web/forms/form-submission.md)

