The newsletter form — Denzel AI Prompts
Denzel has one form: the newsletter box “Newsletter — Join 89,000 subscribers!” in the footer of every page. The prompts build it with its check, its states — “…” while sending, then “Thank you!” or “Something went wrong”, each shown on the button — and a hidden field that catches spam bots. There is no contact form.
| Form | Where | form it sends |
Content |
|---|---|---|---|
| Newsletter | every page (footer) | newsletter |
footer.newsletter in src/content/site.json |
The fields
Section titled “The fields”| Field | Name it sends | Required |
|---|---|---|
email |
yes (an address that looks like name@host.tld) |
The title, the line above the field, the placeholder (“name@email.com”), the button (“Sign Up”), the two messages
(success, error) and the note under the box are in footer.newsletter. After sending, the field is cleared and the
button keeps its message; the page does not change.
Demo mode
Section titled “Demo mode”Until you connect a service, the form runs in demo mode: it waits a moment and says “Thank you!”, but nothing is sent anywhere. Connect it before you publish.
Connecting a form service
Section titled “Connecting a form service”The form sends its fields with a POST, as form data, to the address in an environment variable:
| Tool / framework | Variable |
|---|---|
| Lovable, Bolt, Replit (Vite) | VITE_FORM_ENDPOINT |
| v0 and other Next.js projects | NEXT_PUBLIC_FORM_ENDPOINT |
| Astro | PUBLIC_FORM_ENDPOINT |
- Create a form at a form service — for example Formspree or Basin — or a webhook in Zapier, Make or n8n.
- Copy the address it gives you (e.g.
https://formspree.io/f/abcdwxyz). - Set it as the variable above: in the tool’s settings for secrets or environment variables, or in a
.envfile. The address is built into the site, so build or publish again after you change it. - Sign up once from the footer and check that the request arrives the way you want to read it.
Every sign-up also carries form (newsletter) and subject (“New newsletter subscriber”), which form services use as
the email subject. To send the sign-ups to several places — your inbox, a mailing tool, a spreadsheet — route them
through a Zapier, Make or n8n webhook.
When the service answers with an error, or the network fails, the button says “Something went wrong”.
Other ways
Section titled “Other ways”- Your tool’s database: Lovable and some others can save submissions in a database and email you. Ask: “Save the newsletter sign-ups to the database and email me each one.”
- Your mailing tool: send the sign-ups to Mailchimp, Kit or another newsletter tool through a webhook, or ask your tool to post them to its API from a server function.
- Your own server: the endpoint can be any URL that accepts a form POST — your CRM, a serverless function.
Changing the form
Section titled “Changing the form”The box’s words are content (footer.newsletter). To add a field — a first name, for example — ask your tool to add it
to the Newsletter form and send it with the e-mail (“Add an optional First name field above the e-mail”). A field
arrives at your form service under its name, so keep email as it is.
Privacy
Section titled “Privacy”Newsletter sign-ups are personal data. They go only where you point them: choose a service you trust. The note under the box says “By signing up, you agree to our Privacy Policy”, but Denzel has no legal pages and the note links nowhere: write a privacy policy for your site (a new page, see Making it yours), link it from the note, and ask for consent in the way your country requires.
The hidden fax field stays empty for people and gets filled by bots; when it is filled, the form says “Thank you!”
and sends nothing. Most form services also filter spam themselves.