Skip to content
Sign inJoin waitlist

The forms — Brickfolio AI Prompts

Brickfolio has two forms: the contact form “Let’s Connect” on Home and the newsletter box “Subscribe to Our Newsletter” in the footer of every page with a footer (every page but the 404). The prompts build both with their checks, their states — a turning ring while sending, then “Thank you” or “Something went wrong”, each shown on the button — and a hidden field that catches spam bots.

Form Where form it sends Content
Contact Home (#contact) contact contact in src/content/pages/home.json
Newsletter every page with a footer newsletter footer.newsletter in src/content/site.json
Field Name it sends Required
First Name First Name yes
Last Name Last Name yes
Email Email yes (an address that looks like name@host.tld)
Phone Number Phone Number yes
Message Message no

The labels, placeholders, the button (“Send message”) and its two messages (success, error) are in contact (fields, submit, success, error). Before anything is sent, the form checks its fields: the first empty or wrong one gets the focus and every failing field keeps a red outline until it is changed. On success the fields clear; on an error they keep what the visitor typed.

The newsletter box sends only Email; its title, text, placeholder (“Enter your email”), button (“Subscribe”) and messages are in footer.newsletter. Its field clears after sending, whatever the answer. The page does not change.

Until you connect a service, the forms run in demo mode: they wait a moment, write the fields in the browser console and say “Thank you”, but nothing is sent anywhere. Connect them before you publish.

The forms send their 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
  1. Create a form at a form service — for example Formspree or Basin — or a webhook in Zapier, Make or n8n.
  2. Copy the address it gives you (e.g. https://formspree.io/f/abcdwxyz).
  3. Set it as the variable above: in the tool’s settings for secrets or environment variables, or in a .env file. The address is built into the site, so build or publish again after you change it.
  4. Send each form once and check that the request arrives the way you want to read it.

Both forms go to the same address. Every submission also carries form (contact or newsletter) and subject (“New message from the contact form”; “New newsletter subscriber”), which form services use as the email subject. To send the two forms to different places — your inbox, a mailing tool, a CRM — route them through a Zapier, Make or n8n webhook that looks at form.

When the service answers with an error, or the network fails, the button says “Something went wrong”.

  • Your tool’s database: Lovable and some others can save submissions in a database and email you. Ask: “Save the contact messages and the newsletter sign-ups to the database and email me each one.”
  • Your mailing tool: send the newsletter 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.

The fields, their labels and placeholders are content (contact.fields in pages/home.json, each with name, label, placeholder, type and required): ask your tool to add or remove a field there and show it in the form (“Make Phone Number optional”, “Add an optional Budget field after Phone Number”). A field arrives at your form service under its name, so keep the names you already use somewhere.

Contact messages and newsletter sign-ups hold personal data. They go only where you point them: choose a service you trust. Brickfolio has no privacy page: write a privacy policy for your site (a new page, see Making it yours) that says what the forms collect and where it goes, and ask for consent in the way your country requires before you send the newsletter box to an email-marketing tool.

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.