# Save Submission Actions

This action dictates what Resource and related Resource fields the form data will save to. Every form or Resource created will carry a Save Submission action. When left unmodified, the action will save the data to itself by default.&#x20;

Mapping the Save Submission action to other Resources allows a Form to feed a resource database. The most common example is a Registration form. When a user Registers, the submitted data most likely will need to be saved to some sort of User Resource to build a User database collection.

<figure><img src="https://501951130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6LdEf8SjBIeQDsRL3BdV%2Fuploads%2FbZLs34u7BMq6CuyNebhV%2Fsavesub.jpg?alt=media&#x26;token=b00dcf82-479f-4950-a1d6-af4a76e7bd78" alt=""><figcaption><p>Save Submission action mapped to the User Resource</p></figcaption></figure>

## Settings

**Save Submission To:** Select which Resource the submission data should map to. When left blank (default), the submission will save to itself.&#x20;

**Resource Property:** Set a Property to the mapped Resource that will be assigned to.&#x20;

**Simple Mappings:** When a Resource is selected, the available fields from that Resource will become available for mapping in the Simple Mappings section. Clicking a field will present a Dropdown of fields from the Form the action is attached to where fields from your Form are mapped to fields from the Resource.&#x20;

**Transform Data:** Use the Transform Data if you are trying to map fields inside complex data structures like EditGrids, Containers, Nested Forms, etc. Available variables are Submission and Data.&#x20;

## Walkthrough

In this example, we are going to configure a Save Submission action on a Registration form to map submission data to a User Resource. In turn, as the Registration form collects submissions, the  Resource will build its database of Users within the project.

To start, **create a Resource** called Users and add the following fields:

Email - Email

Password - Password

<figure><img src="https://501951130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6LdEf8SjBIeQDsRL3BdV%2Fuploads%2FcmJjqx0r1jkIPNO9r5Is%2Fsavesubmissionres.jpg?alt=media&#x26;token=236ca193-21a9-467f-9bb5-ecef10fa7c4d" alt=""><figcaption></figcaption></figure>

Next, create a Form called Registration. **Add the following fields**:

First Name - Textfield

Last Name - Textfield

UserName - Textfield

Email  - Email

Password - Password

<figure><img src="https://501951130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6LdEf8SjBIeQDsRL3BdV%2Fuploads%2FfpXRIVVGubh7Rv5uKHPY%2Fregistration.jpg?alt=media&#x26;token=fb876dab-64a0-47e0-ac5c-de5944b1e699" alt=""><figcaption></figcaption></figure>

Click the Action tab for the Registration form and add another **Save Submission action**. Within the Action settings, click the Save Submission To dropdown and select the **User resource**. Next, **map the Email and Password fields** from the form to the Resource fields presented in the Save Submission Action. Save your action.

<figure><img src="https://501951130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6LdEf8SjBIeQDsRL3BdV%2Fuploads%2FM29ZTwzg4q4QkRIgvdlj%2Fssaction.jpg?alt=media&#x26;token=383c875b-fe72-4afc-b5f0-652adc83030a" alt=""><figcaption></figcaption></figure>

To test the action, **Use** the Registration form and make a **submission**.&#x20;

<figure><img src="https://501951130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6LdEf8SjBIeQDsRL3BdV%2Fuploads%2FSPEb3beaFm1Du9F82zMc%2Fsubmitt.jpg?alt=media&#x26;token=a49692e0-5b93-4d84-9a25-a8c6a9e55f85" alt=""><figcaption></figcaption></figure>

The submission should map to the User Resource, creating a submission record. To verify this, navigate to your User resource and click the **Data tab**. There should be a new submission entry from the Registration form.&#x20;

<figure><img src="https://501951130-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6LdEf8SjBIeQDsRL3BdV%2Fuploads%2FWWvfmpirMx6LCoWeMSXI%2Fresourcesubmission.jpg?alt=media&#x26;token=c1b45b93-4743-4ece-9f92-08e97e57da32" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Encrypted password data will not display when viewing a submission.
{% endhint %}

## Video

{% embed url="<https://www.loom.com/share/f5fd123b08ed471cacdaa5bb8dede0d3>" %}
