In this article, we will explain how to pre-populate a form in a landing page with contact attributes.
Pre-populating the fields in the form of your landing page will make things easier for your existing contacts as they won't have to fill them in manually.
Good to know
- The contact and their information are already stored in your Brevo contacts. If a contact or some of their information is not yet stored in your Brevo contacts, the corresponding fields in your form will appear blank.
- Your landing page is shared through an email campaign. This is the only way we can recognize your contact and get their information.
- You are using Text-type contact attributes, such as email or first name. You cannot use Number, Boolean, or Date type contact attributes.
1️⃣ Add a form to your landing page
To learn how to add a form to a landing page, check our dedicated article Landing pages - Part 4: Add a form to your landing page and use advanced options.
2️⃣ Pre-populate the fields in your form
- Hover over the form in your landing page and click Edit Form > Click here to add Form Field.
- Under the Manage Fields setting, select a contact folder and list.
- Select the contact field that you want to pre-populate.
- Click the contact field you selected.
- In the URL Param field, enter the URL parameter that you want to use to pre-populate the field in your form. In our example, we used the "email" URL parameter.
- Repeat steps 3, 4, and 5 for all the fields that you want to pre-populate.
- Optional: To allow existing contacts to update their information stored in your Brevo account from your form, check the Update existing contacts on form submission option under the Form Submission Controls setting.
Once you're done designing your landing page, click Launch and publish it.
3️⃣ Add the URL of your landing page to an email campaign
- From the Launch page, copy the URL of your landing page.
- Paste the URL of your landing page into your email campaign. In our example, we added the URL in a call-to-action button.
- Modify the URL of your landing page to include the URL param that you added in your form and the contact attribute corresponding to this URL param using the following format:
- Click Update.