---
title: "Using one form for multiple contacts"
date: "2024-02-14T06:18:38+00:00"
summary: "Create and update multiple contacts with a single form submission. Learn how to set up two interconnected forms in Campaign Studio for efficient data collection and contact management."
image:
type: "page"
url: "/campaign-studio/using-one-form-multiple-contacts"
id: "0990148f-c3af-499e-b59d-93c6e9280da8"
---

Overview
--------

A standard use-case while using forms is the ability to use a single form to create or update multiple contact records in Campaign Studio. This use-case is applicable to business referrals, partner deal registrations, and sending e-cards, etc.

To use this feature, you must perform the following two primary steps:

*   [Creating forms](#creating-forms)
    
*   [Posting results to another form](#posting-results-to-another-form)
    

Creating forms
--------------

To use one form for multiple contacts, you must create two forms in Campaign Studio. While a single form appears on your website or landing page, the system shares data with the other form. Hence, you will receive two form submissions even though a contact submits only one form.

The parent form contains all the fields that you want a person to see on your landing page or website, including fields for the form-submitter and for the second contact you want to have created or updated.

You do not need to map all form fields to a contact record. However, if you want to track information for the referrer on the referee’s record, you may want to create custom fields for that data and map the form fields to those contact fields.

To illustrate the process, let us consider that you will create two forms. The first form contains seven fields while the second form contains three fields.

To create the first form:

1.  Log in to Campaign Studio.
    
2.  In the left navigation pane, click **Components** > **Forms**.
    
3.  Click **+New**.
    
4.  Set a name for the form and enter the relevant details.
    
5.  In **Fields**, create the following fields:
    
    *   `Contact 1 First Name`
        
    *   `Contact 1 Last Name`
        
    *   `Contact 1 Email`
        
    *   `Contact 2 First Name`
        
    *   `Contact 2 Last Name`
        
    *   `Contact 2 Email`
        
    *   `FormID`
        
    
    Note
    
    You cannot completely configure the `FormID` field until you create the second form. For more information, see [Creating FormID field](#creating-formid-field).
    
6.  Map the first three fields for Contact 1, such as `Contact 1 First Name`, `Contact 1 Last Name`, and `Contact 1 Email` to the appropriate fields under the **Mapped Field** tab in the form field editor. For example, the `Contact 1 First Name` field should be mapped to `First Name`.
    
    ![Creating forms mapped field](https://acquia.widen.net/content/azsabsqi5x/jpeg/campaign-studio_creating-forms-mapped-field.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
    Ensure that you leave the last four fields unmapped.
    
    ![Editing form fields](https://acquia.widen.net/content/4haomzqhgb/jpeg/campaign-studio_editing-form-fields.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
7.  Save the first form.
    

To create the second form:

1.  Access the same instance where you have created your first form.
    
2.  In the left navigation pane, click **Components** > **Forms**.
    
3.  Click **+New**.
    
4.  Set a name for the form and enter the relevant details.
    
5.  In **Fields**, create the following fields:
    
    *   `Contact 2 First Name`
        
    *   `Contact 2 Last Name`
        
    *   `Contact 2 Email`
        
    
    Tip
    
    You may achieve this quickly by cloning the first form and deleting all but the above fields from that form.
    
6.  Map these three fields for Contact 2 to the appropriate fields under the **Mapped Field** tab in the form field editor. For example, the `Contact 2 First Name` field should be mapped to `First Name`.
    
    ![Creating forms mapped field](https://acquia.widen.net/content/vezztl5j4v/jpeg/campaign-studio_creating-forms-mapped-field-1.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
    ![Editing form fields](https://acquia.widen.net/content/uzdz8zf1ar/jpeg/campaign-studio_editing-form-fields-1.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
7.  Navigate to the **Attributes** tab and copy the value of **Field HTML name** for all the three fields. You will need these values for future use.
    
    ![Creating forms attributes](https://acquia.widen.net/content/cbghtbeym3/jpeg/campaign-studio_creating-forms-attributes.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    

Posting results to another form
-------------------------------

Once the two forms are created, you must configure an action on the first form so that the results from the first form can be pushed to the second form.

1.  Access the first form, go to **Actions**, and select **Post results to another form**.
    
    ![Posting results to another form](https://acquia.widen.net/content/zojelukqei/jpeg/campaign-studio_posting-results-to-another-form.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
2.  Set a name for the form action.
    
3.  In **Post URL**, set the URL to post the first form results to the second form.
    
    This value should in the following format:
    
        https://{instancedomain}/form/submit?formId={destinationId}
        
        For example,
        
        https://instance.campaignstudio.net/form/submit?formId=2
    
    Here, `{instancedomain}` is the custom domain for your instance and `{destinationId}` is the ID for your second form that should receive the results from the first form.
    
4.  (_Optional_) If you or your team members need to be notified in case of any errors with posting form results to a second form, specify all such email addresses in **Post failure notification email**.
    
5.  Under **(Optional) Override field names for the receiving form**, leave all the fields related to Contact 1 blank. For the fields relating to the second contact that you want to push to the second form, use the format `mauticform[fieldalias]`, where `fieldalias` is the value of **Field HTML name** field under the **Attributes** tab for the specific field of the first form. In our example, `Contact 2 First Name` should have a value of `mauticform[contact_2_first_name]`.
    
6.  Save the action and the form.
    
7.  Open the form preview page and complete the form. Ensure that the two email addresses are different.
    
8.  Observe the form results for both forms and the activity histories for both contact records. You should see the results in all the four places.
    

Creating FormID field
---------------------

You must create a hidden field called `FormID` in the first form. This field helps establish the connection between the two forms.

To create this field:

1.  Take a note of the form ID for the second form. To find the form ID, go to **Components** > **Forms** and locate the destination form. The ID number is in the far right column.
    
    ![Creating formID field](https://acquia.widen.net/content/x4bngmofys/jpeg/campaign-studio_creating-formID-field.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
2.  Return to editing the first form and add a new field, using the **Hidden** field type.
    
    ![Creating formID field](https://acquia.widen.net/content/kf8zoczftg/jpeg/campaign-studio_creating-formID-field-1.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
3.  Specify the **Label** for the field, set **Save result** to **No**, and set **Default value** to the form ID of the second form.
    
    ![Creating formID field](https://acquia.widen.net/content/q9jyk5o0ys/jpeg/campaign-studio_creating-formID-field-2.jpeg?position=c&color=ffffffff&quality=80&u=kymscu)
    
    Note
    
    You cannot have space or underscore in the **Label**. Acquia recommends that you use `FormID` as the label, which automatically generates a usable alias of `formid`.
    
4.  Save the field and the form.