To use a custom signup form on your website that transmits subscriber data to your MailChimp list, you'll need to add some MailChimp information to your form code. You'll locate the form action, user ID, list ID, and input name elements in your hosted MailChimp form, and insert them into the form you host on your website.
This is an advanced feature and is recommended for users familiar with custom coding. Contact your developer, or hire a MailChimp Expert if you need assistance.
Below, you'll learn where to find this information.
Access the MailChimp Form Code
- Navigate to the Lists page.
- Click the drop-down menu next to the list you want to work with and choose Signup forms.
- Select Form builder.
- Highlight and copy the Signup form URL.
- Paste the Signup form URL into the address bar of a new browser tab or window and press Enter.
- Right-click (Windows) or control+click (Mac) anywhere on the page and choose View Page Source from the drop-down menu.
Edit your Custom Signup Form
In the page source for your MailChimp hosted signup form, you'll find the pieces of code that need to be added to the form code on your website.
First, copy and paste the form action and input information into the body of your custom signup form. Then, find the input type for each list field, and copy that information into the corresponding fields in your custom signup form code. All of these values must be copied to your custom signup form for the data transfer to work properly.
- Browse or search the page for "form action" to find the first piece of code you need, and copy the lines that look something like this.
<form action="http://mailchimp.us8.list-manage.com/subscribe/post" method="POST"> <input type="hidden" name="u" value="a123cd45678ef90g7h1j7k9lm"> <input type="hidden" name="id" value="ab2c468d10">
The code indicates your user ID and list ID so we can link the information to the right place in your MailChimp account.
- Paste those rows into the hosted form code on your website.
- Scroll to find the first list field, like Email Address, and look for the <input> tag.
<input type="email" name="MERGE0" id="MERGE0">
- Copy the name value and insert text into the matching tag in your custom signup form. In this case, the name value is MERGE0.
- Repeat steps 3 and 4 for every list field in your custom signup form.
As always, test your form thoroughly. Visit your custom form and sign up with information in every field. Confirm your subscription, and then search for your subscriber profile in MailChimp. Check out all the field values and make sure that each field transferred over correctly.