Skip to content
Sign inJoin waitlist

Forms — Semono Next.js

The three forms of this Next.js template work as soon as you run it: a Contact inquiry, a service consultation and a career application.

The inquiry is on the Contact page, a consultation form on every service page and an application form on every career page. Each form checks the required fields, shows a spinner while sending, says “Thank you” and clears the fields, keeps what the visitor typed when something fails (“Something went wrong”), and drops spam with a hidden honeypot field.

Out of the box, submissions are written to the server log (FORM_PROVIDER=console). That’s fine while you build, but useless once you publish, so pick a destination before launch. One provider serves all three forms; every submission carries the title of its form, so you can tell them apart in your inbox or tool.

  1. Copy the example settings:

    Terminal window
    cp .env.example .env.local
  2. Choose one:

    You want Set
    An email for every submission FORM_PROVIDER=resend + RESEND_API_KEY, FORM_EMAIL_TO, FORM_EMAIL_FROM
    It in your CRM, Slack, a spreadsheet… FORM_PROVIDER=webhook + FORM_WEBHOOK_URL (Zapier, Make, n8n, Formspree, your own API)
    The sender in a Mailchimp audience FORM_PROVIDER=mailchimp + MAILCHIMP_API_KEY, MAILCHIMP_AUDIENCE_ID

    Several at once work: FORM_PROVIDER=resend,mailchimp.

  3. Restart npm run dev and send a test from each form.

  4. Put the same variables in your host’s dashboard before deploying. .env.local is not uploaded.

Details for each provider, what it receives, the webhook payload, Mailchimp consent settings and how to write your own provider are in Forms reference.

The inquiry on the Contact page (title “New contact inquiry”):

Field Name it arrives under Required
Full Name name yes
Business Email email yes
Phone Number phone
Company Name company
Service Required (Business Strategy, Operational Consulting, Leadership Advisory, Corporate Transformation, Financial Advisory, Brand & Market Consulting, Process Optimization, Organizational Growth) service yes
Project Budget (Under $5,000, $5,000 — $10,000, $10,000 — $25,000, $25,000+) budget yes
Project Details details

The consultation form on every service page, after the overview (button “Book a free consultation”, title “New consultation request”): name (Full Name, required), email (Business Email, required), phone, company, service (Service Required: a text field that starts with the page’s own service, so a visitor on “Business Strategy” sends “Business Strategy”) and details (Project Details).

The application form on every career page, in the white card (button “Submit application”, title “New job application”):

Field Name it arrives under Required
Name name yes
Email email yes
Phone phone
Job Position (starts with the page’s own position) position
LinkedIn URL linkedin
Cover letter letter

Resend puts the sender’s name after the title in the email’s subject and sets the reply address to the sender’s e-mail. Mailchimp stores the name as FNAME, tags the contact with the title and keeps the rest as a note. A webhook receives every field of the form, as "" when left empty, with its label.

The labels, placeholders, the choices of the selects, the button’s three texts (the inquiry’s are “Send inquiry”, “Thank you” and “Something went wrong”) and the title of each submission are content: contactForm in src/content/pages/contact.ts, consultationForm in src/content/pages/service.ts and careerForm in src/content/pages/career.ts. A field arrives at your provider under its name, so keep the names you already map somewhere. The Contact form’s service choices are typed there; they include two that are not services of the collection (“Process Optimization”, “Organizational Growth”): make the list match your own services.

The server action of each form (submitContact in src/lib/actions-contact.ts, submitConsultation in src/lib/actions-consultation.ts and submitApplication in src/lib/actions-application.ts) sends every field listed in its form and checks the required ones again on the server, so the list in the copy is the place to edit:

  • To make a field required, set required: true on it. Its label gets a red asterisk, the browser checks it before sending and the server checks it again. A required field must be on the page: if it is only in the list, every submission fails.

  • To add a field, add an entry, for example a website:

    website: { name: "website", label: "Website", placeholder: "https://", type: "url", autoComplete: "url" },

    The types are text (the default), email, tel, url, select (with options; the placeholder is its empty first choice) and textarea. On the career pages the field then appears by itself, in the order of the list. On the Contact page and on the service pages the fields are laid out by hand, so also place it in the form: <FormField {...fields.website} /> in src/components/sections/ContactSection.tsx or src/components/sections/ServiceActionSection.tsx (add className="md:col-span-2" for a full-width one).

  • To remove a field, delete its entry, and on the Contact and service pages its <FormField … /> line.

  • Don’t give a real field the name fax: it is the honeypot’s (Spam).

  • Submit each of the three forms on your own site after deploying, with a real address: one inquiry, one consultation request from a service page and one application from a career page.
  • Check the destination (inbox, spreadsheet, audience) and reply to the test.
  • Try a failure on purpose: set a wrong API key, submit, and confirm the visitor sees “Something went wrong” and their text is still there.

The honeypot stops the usual bots: every form carries a hidden field named fax that a person never sees; a bot that fills it is shown “Thank you” and nothing is sent. If you start getting spam anyway, put a service in front through the webhook provider (Formspree, Web3Forms and Basin all include spam filtering), or add a captcha to the form component.

Submissions go only where you point them; nothing is sent anywhere else. Most countries expect you to say what happens to the data people send you, and the application form collects a name, an e-mail, a LinkedIn address and a cover letter. Semono has no consent checkbox. The footer links a Privacy Policy and Terms of Service whose text (src/content/collections/legal.ts) is a demo to replace with your own.

The forms don’t ask for marketing consent, so if you send them to Mailchimp, keep MAILCHIMP_STATUS at transactional (the default): those contacts can get your replies, not your campaigns. The provider applies to all three forms, so job applicants land in the audience too, tagged “New job application”; if you don’t want that, use another provider.