Forms
Files: src/config/config.toml, form fields in content files, src/i18n/<lang>.json · Skill level: Beginner
Covena’s forms send to a form service you choose: Formsubmit, Formspree or Netlify Forms. The site itself stores nothing and needs no server. Until you connect a service, every form runs in demo mode: it checks the fields, then tells the visitor that nothing was sent.

The Forms And Where Their Fields Are
| Form | Where it shows | Fields and labels |
|---|---|---|
| Contact form (“Get in touch”) | Home 1 and most inner pages | form in src/content/sections/<language>/contact-split-form.md |
| Contact page form | /contact/ | form in src/content/contact/<language>/-index.md |
| Consultation form | /consultation/ | form in src/content/consultation/<language>/-index.md |
| Callback form (“Ask us to call you back”) | Home 3 | form in src/content/sections/<language>/contact-callback-panel.md |
| Job application form | Every role page under /careers/ | application.form in src/content/careers/<language>/-index.md |
| Newsletter (footer) | The columns-light footer (Home 2) | [settings.subscription] in config.toml |
| Newsletter (panel) | /insights/ | src/content/sections/<language>/newsletter.md |
The first five share one endpoint. The two newsletter forms are set up separately.
Connect The Forms
Set the endpoint and the service in [settings] of src/config/config.toml:
[settings] contactFormAction = "" # empty = demo mode contactFormProvider = "formsubmit.co" # formspree | formsubmit.co | netlifycontactFormAction = "https://formsubmit.co/[email protected]"contactFormProvider = "formsubmit.co"No account needed. Formsubmit emails you the first time a form is sent, to confirm the address. Submissions arrive as a table in your inbox.
contactFormAction = "https://formspree.io/f/your-form-id"contactFormProvider = "formspree"Create a form in your Formspree account and copy its address.
contactFormAction = "/"contactFormProvider = "netlify"Works only when the site is deployed on Netlify. Turn on form detection in your Netlify site settings, and submissions appear under Forms.
Each form’s emailSubject becomes the subject line of the email you receive, so you can tell the forms apart: “New consultation request from the Covena Law website”, “New callback request…” and so on.
Send One Form Somewhere Else
Add action to that form’s block. It overrides contactFormAction for this form only. The content files have a commented line ready:
form: action: "https://formspree.io/f/another-form-id" emailSubject: "New consultation request from the Covena Law website"The service setting (contactFormProvider) still applies, so use the same service for every form.
The Newsletter Forms
Footer form (the columns-light footer on Home 2). It sends to Mailchimp:
[settings.subscription] enable = true title = "" # empty uses footer.newsletterTitle in src/i18n/<lang>.json note = "" # empty uses subscription.description in src/i18n/<lang>.json formAction = "" # your Mailchimp form action mailchimpTagValue = "" # optional numeric Mailchimp tag IDTo find formAction: in Mailchimp, open Audience > Signup forms > Embedded form and copy the address in <form action="...">. The form signs people up without leaving the page. Set enable = false if you don’t send a newsletter.
Panel on /insights/. It has its own settings in src/content/sections/<language>/newsletter.md:
formAction: "" # your email service's form actionemailFieldName: "email" # use the exact field name your service expects, such as EMAILhiddenFields: [] # extra fields your service needs, as name and value pairsNever put a private key or password in hiddenFields: the page shows them to anyone who views its source. Both newsletter forms run in demo mode while formAction is empty.
Change The Fields
Each form lists its fields under inputs. Edit the labels, add fields or remove them, in every language:
inputs: - label: "Full name" name: "Full name" # the name you see in the email required: true - label: "Email" name: "Email" type: "email" required: true halfWidth: true # half the row, next to the following field - label: "Practice area" name: "Practice area" placeholder: "Choose one" dropdown: type: "select" items: - { label: "Employment", value: "Employment" } - { label: "Not sure yet", value: "Not sure yet" } - label: "How can we help?" name: "Message" tag: "textarea" rows: "5" required: true - label: "I agree that ... as set out in the [privacy policy](/privacy-policy/)." id: "home-contact-consent" name: "Consent" value: "Yes" type: "checkbox" required: true| Key | What it does |
|---|---|
label | The text above the field. Markdown links work, as in the consent box |
name | The field name in the email. Keep it the same in every language if you want the emails to match |
type | text (default), email, tel, radio or checkbox |
tag | textarea for a multi-line field, with rows |
required | true makes the field required |
halfWidth | true puts the field in half a row on wide screens |
placeholder | Grey text inside an empty field |
dropdown | A list to choose from, with type: "select" and items |
minLength | The fewest characters allowed. Text areas default to 10 |
id | A unique id. Give every checkbox its own |
The button is submitButton in the same block. Change its label there.
Messages
The messages after sending are in src/i18n/<lang>.json, in each language:
contactForm.success: “Thanks, we’ve got your message. We’ll be in touch within 2 working days.”contactForm.error,contactForm.timeoutandcontactForm.submittingcontactForm.validation: the messages under a field that’s empty or wrong (“This field is required.”, “Please enter a valid email address.” and so on)forms.demoandforms.demoLive: the demo mode notessubscription.*: the newsletter messages
The success message promises a reply within 2 working days. Change it if your firm works to a different time.
Privacy
The forms send what visitors type to the service you chose, so:
- Name the service in your privacy policy (
src/content/pages/<language>/privacy-policy.md). - Keep a consent checkbox that links to the privacy policy, as the sample forms do.
- Ask only for what you need. People often describe sensitive matters in the message box. Consider adding a line asking them not to send confidential details before you’ve agreed to act.
Do It With AI
Connect the Covena forms to Formspree. In src/config/config.toml set contactFormAction to"[FORMSPREE URL]" and contactFormProvider to "formspree". Send the job application form to"[SECOND URL]" by adding action to application.form in src/content/careers/<language>/-index.md,in every language. Set formAction in [settings.subscription] to "[MAILCHIMP URL]". Don't changethe fields. Then run npm run build.