Skip to content
Sign inJoin waitlist

The contact form — Compose Digi AI Prompts

Compose Digi has one form, “Get in touch.”, the Contact page’s main section. The prompts build it with its checks of the required fields and the email address, its states — sending, “Thank you”, “Something went wrong”, each shown on the Submit button — and a hidden field that catches spam bots.

Form Where form it sends Content
Contact Contact contact form in src/content/pages/contact.json
Field Name it sends Required
First Name first-name yes
Last Name last-name yes
Email email yes (a valid address)
Phone Number phone no
Message message no
Services (a checkbox per service) services, the list of the ticked services’ names no

Labels, placeholders, the error messages and the button texts are in the form’s fields, submit, success and error. The services are the names in src/content/collections/services.json: a new service adds a checkbox. Empty fields are sent empty.

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.

The form sends its fields as JSON 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 service that accepts JSON posts — 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 the form once, with two services ticked, and check that the request arrives the way you want to read it.

Every submission also carries form (contact) and subject (the form’s notification: “New contact request”), which form services use as the email subject. To send the requests to several places — your inbox, a CRM, a project board — 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” and the visitor’s answers stay in the fields.

  • Your tool’s database: Lovable and some others can save submissions in a database and email you. Ask: “Save the contact requests to the database and email me each one.”
  • Your own server: the endpoint can be any URL that accepts a JSON POST — your CRM, a serverless function.
  • A booking tool: the footer’s “Book a Call” and the hero’s “Book a call” link to Cal.com’s home page in the demo (bookCallLink in site.json and the footer’s Support column): point them at your own Cal.com or Calendly page.

The fields, their labels and placeholders are content (fields of form): ask your tool to add or remove a field there and show it in the form (“Add an optional Company field after Email in the contact form”). A field arrives at your form service under its name, so keep the names you already use somewhere.

Careers has no form: each job opening’s “How to Apply” asks candidates to e-mail careers@example.com. Change the address in the openings’ apply texts (src/content/collections/careers.json).

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.