Articles in this category

Create a newsletter form with backend capture

Andrija Krstic Updated by Andrija Krstic

This article provides guidance on how to build the email newsletter form and how to make sure that the emails collected through the form are passed to Leads section of the Subbly admin.


Overview

Learn how Subbly handles Leads here.

An example of the email newsletter form you can build on Subbly can be seen below.


Video & Prompt Instructions

Prompts used in the video are copied below.

We need to implement leads integration from the Subbly backend. When this form is filled out and submitted, the data must be transferred to Subbly Leads on the backend. Use the following code to implement the leads logic [Paste the code that you can grab from the backend of Subbly]
If a user enters an email that already exists in the database, the form should still allow them to subscribe again. Do not block the user or show an error for existing emails. Ensure that the subscription is processed normally, and the user receives any confirmation or follow-up as usual.
Provided prompts are intended as guidance only and should be adapted and refined for the specific use case before being used in a project. Given the indeterministic nature of AI systems, the same prompt may also produce slightly different results across environments or executions.

Passing emails to external platforms

In order to pass this information to an external platform (such as Klaviyo, Mailchimp, or to your own email), you can resort to the same methodology whilst pasting the embed script provided by the selected platform. If you're looking to receive email notifications on your personal or business email when you have the new form submission on site, we suggest integrating the solution with Web3. Web3 has a free plan for up to 250 monthly submissions.

Video below explains how to pass email submissions to your personal email by using Web3.

Prompts used in the video above:

Create a new landing page for Contact with the URL /contact. Make sure to use the same design and style patterns as the home page. The page should include a contact form with the following fields: Name Email Message (TextArea) Ensure the form is fully functional and styled consistently with the rest of the site.
We need to install and integrate Web3Form to work with the existing contact form. Follow these steps: Create an environment variable for the access key (to be populated later). Do not hardcode it. Use the following code as a base and modify it to use the environment variable for access_key. Ensure the form submits data to Web3Form API (https://api.web3forms.com/submit) and handles success/error messages. Display submission status to the user (e.g., "Sending...", "Form Submitted Successfully", or error message). Reset the form after a successful submission. Code example to adapt: [Paste the embed code from Web3]

Did you find this resource helpful?
Return to top
Ready to get started
with Subbly?
Try for free