Skip to content
New: Customize your theme with an AI assistant. Read the guide

Customizing the Subscription Form

Files: src/config/config.toml, src/content/sections/<language>/cta-gallery-section.md · Skill level: Beginner

In the Tina edition, these settings are under Site settings > Settings > Subscription at /admin/. In the Sanity edition, they are in the Studio under Site settings > Settings > Subscription.

The subscription form lets visitors join your email list. In Techbyte it isn’t in the footer. It is in the gallery section just above the footer (CTAGallerySection.astro), on the pages that show that section’s secondary version. That is most pages, including Home 02. Home 01 shows the gallery without the form.

To configure it, open src/config/config.toml and find the following section:

src/config/config.toml
[settings.subscription]
enable = true
title = ""
note = ""
formAction = "https://your-account.us1.list-manage.com/subscribe/post?u=YOUR_USER_ID&id=YOUR_LIST_ID&f_id=YOUR_FORM_ID"
mailchimpTagValue = ""
  • enable → Shows or hides the form.
  • formAction → The action URL for the form. It ships as a placeholder, and nothing warns you if you leave it. Mailchimp’s code shows &amp;: change each one to a plain &.
  • mailchimpTagValue → An optional Mailchimp tag for new subscribers.
  • title and note aren’t shown by the form. The heading above it is title in src/content/sections/<language>/cta-gallery-section.md.

The form’s button, placeholder, and messages are in src/i18n/<lang>.json, under common and subscription.

Getting Mailchimp Subscription Form Action URL

Currently, we are using Mailchimp for our subscription form. You can find the form action URL in the Mailchimp dashboard. Follow the steps below to get the form action URL:

  1. Create a Mailchimp Account

    If you don’t already have a Mailchimp account, sign up at mailchimp.com or log in if you have one.

  2. Create an Embedded Form

    After logging in, you will see the dashboard. From the left sidebar, click the Create button located at the top.

    mailchimp tutorial how-to image

    Then click Signup Form, then Embedded Form, and fill out the form before clicking Begin.

    mailchimp tutorial how-to image

    After you click Begin, you will see a page where you can add more fields. Now, from the top right, click the Continue button.

    mailchimp tutorial how-to image

    You will then see the following page. From the embedded form code, copy the form action value and paste it into the config.toml file under the formAction option.

    mailchimp tutorial how-to image

    Ready to try? Fill out and submit the subscription form to test it.

Type something to search...