Configuring subscription form (mailchimp)
We use Mailchimp for email subscriptions. To receive leads directly in your Mailchimp account, follow this guide.
-
Create a Mailchimp Account
This is a very easy process. If you don’t already have a Mailchimp account, sign up at mailchimp.com or log in if you have one.
-
Create an Embedded Form
After logging in, you will see the dashboard. From the left sidebar, click the
Create
button located at the top.Then Click
Signup Form
, thenEmbedded Form
, and thenBegin
. -
Copy the
HTML Form Action Value
After completing the previous steps, you will see a page where you can add more fields (for our theme, we only added an email field). We didn’t used mailchimp full html code unless important code and form style. That’s why, we just need
the form action value
. This value can be found in the HTML code after clicking theContinue
button. -
Replace the Copied
Form Action Value
After copying the HTML form action value, open the
subscription-form.html
file located at/src/partials/components/subscription-form.html
. This partial is used as the subscription form on most pages in this theme, with some exceptions. Then, replace the value of theform action
attribute with the value you copied.<div class="subsciption-form"><!-- subscription form --><formaction="https://gmail.us22.list-manage.com/subscribe/post?u=436cb8647d746fe81825f1efc&id=18a007239a&f_id=00cfc7e1f0"action="your-copied-form-action-value"id="mc-embedded-subscribe-form"novalidate="true"method="post"><div class="row gy-3"><div class="col-12"><div class="input-group"><label for="mce-EMAIL" class="visually-hidden">Email</label><inputtype="email"name="EMAIL"placeholder="Your Email"class="form-control required email"id="mce-EMAIL"aria-required="true"autocomplete="off"required /><buttontype="submit"name="subscribe"id="mc-embedded-subscribe"class="btn-icon btn-animated-hover-trigger ms-auto d-block centered">Subscribe<div class="btn-animated btn-animated-t-right centered"><iclass="material-symbols-rounded float-none fs-6 mt-1 btn-animated-child btn-animated-child-invisible">call_made</i><iclass="material-symbols-rounded float-none fs-6 mt-1 btn-animated-child btn-animated-child-visible">call_made</i></div></button></div></div><div style="position: absolute; left: -5000px" aria-hidden="true"><inputtype="text"name="b_436cb8647d746fe81825f1efc_18a007239a"tabindex="-1"value="" /></div><input type="hidden" name="EMAILTYPE" id="mce-EMAILTYPE-0" value="html" /></div></form><div id="mce-responses" class="clear"><divclass="message message-error"id="mce-error-response"style="display: none"></div><divclass="message message-success"id="mce-success-response"style="display: none"></div></div><scriptdeferasynctype="text/javascript"src="//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js"></script><!-- /subscription form --></div>Here is a html form code with first name & last name fields
<!-- subscription form --><formaction="https://gmail.us22.list-manage.com/subscribe/post?u=436cb8647d746fe81825f1efc&id=18a007239a&f_id=00cfc7e1f0"id="mc-embedded-subscribe-form"novalidate="true"method="post"><div class="row gy-3"><div class="col-12"><div class="input-group"><label for="mce-FNAME" class="visually-hidden">First Name</label><inputtype="text"name="FNAME"placeholder="Your First Name"class="form-control text"autocomplete="off"id="mce-FNAME" /></div></div><div class="col-12"><div class="input-group"><label for="mce-LNAME" class="visually-hidden">Last Name</label><inputtype="text"name="LNAME"class="form-control text"id="mce-LNAME"autocomplete="off"placeholder="Your Last Name"value="" /></div></div><div class="col-12"><div class="input-group"><label for="mce-EMAIL" class="visually-hidden">Email</label><inputtype="email"name="EMAIL"placeholder="Your Email"class="form-control required email"id="mce-EMAIL"aria-required="true"autocomplete="off"required /></div></div><div style="position: absolute; left: -5000px" aria-hidden="true"><inputtype="text"name="b_436cb8647d746fe81825f1efc_18a007239a"tabindex="-1"value="" /></div><inputtype="hidden"name="EMAILTYPE"id="mce-EMAILTYPE-0"value="html" /><div class="col-12"><buttontype="submit"name="subscribe"id="mc-embedded-subscribe"class="btn-icon btn-animated-hover-trigger ms-auto d-block">Subscribe<div class="btn-animated btn-animated-t-right centered"><iclass="material-symbols-rounded float-none fs-6 mt-1 btn-animated-child btn-animated-child-invisible">call_made</i><iclass="material-symbols-rounded float-none fs-6 mt-1 btn-animated-child btn-animated-child-visible">call_made</i></div></button></div></div></form>