Forms (module)
Forms is an official module: an admin installs it and switches it on under Modules (Managing modules). Then editors build their own forms (a sign-up, a quote request, a registration) without a developer: a list of fields, a button and a thank-you message. What visitors send is stored in SHADE, shown under Form submissions, and optionally emailed. A website page shows a form through the module's Form starter.
What users can do
- Editors and admins build forms in Forms (in the sidebar's Content section), save drafts and publish them like any entry (see collections and versions), and translate them (see languages). They read the submissions, reply to them by email, download them as CSV and delete them.
- Admins also add the Form starter to the website editor, once per published form (see On a website page).
- Visitors fill in and send the form on the site. They see the confirmation message, or an error message in the page's language.
Who may do it
| Action | Permission | Roles |
|---|---|---|
| Build, edit, publish, delete forms | collections.forms-forms.create / .update / .publish / .delete | admin, editor |
| Read the submissions, reply, download CSV | forms.submissions.read | admin, editor |
| Delete a submission | forms.submissions.delete | admin, editor |
| Send a form | none (anyone, with a limit per visitor) | anyone |
AI users never hold those two actions. They have the smaller ones in AI tools: forms.ai.read and forms.ai.triage.
The form
Forms is the normal collection list and entry editor. A form has:
| Field | Notes |
|---|---|
| Name | For you; visitors do not see it. |
| Key | The form's own key, in the form's data. It follows the name until the form is published and then stays. |
| Fields | A list. Per field: Label, Type, Required, Choices (for a choice from a list or of buttons), Help text, Key and Purpose. |
| Button label | The text of the send button. |
| Message after sending | What the visitor sees once the form is sent. |
| Consent checkbox | Empty: no checkbox. Otherwise visitors must tick it to send the form. |
| Email submissions to | Addresses separated by commas. Empty: submissions are only kept in the admin. |
| Send the sender a confirmation | Off by default. Sends the sender an email with a copy of what they sent (see The sender's confirmation). Needs a field with the purpose Email. |
Field types: short text, long text, email address, phone number, number, date, choice from a list, choice of buttons and checkbox. A choice from a list is a drop-down; a choice of buttons shows each choice as a radio button, grouped under the field's label.
Keys
Every field and every choice has a key. A key follows its label until the form is published, and then stays: renaming a label never changes it. A field of another type needs a new key. The form has a key of its own too.
Keys may not be form, website, consent or language, nor a name the page or another form already uses (names
such as action or submit would clash with the page itself). Publishing is refused when a published form's key
changes, or a key's type.
Purpose
A field may have a purpose, one of the names browsers know for filling in forms: email, full name, first name, last name, phone, organisation, street and number, postcode, town or city, country. Only one field of a form has each purpose. The browser uses it to suggest the visitor's own details, and SHADE uses the answer to the field with purpose email to link the submission to a contact (see Privacy and retention).
Form submissions
Form submissions (in the sidebar's Content) is the inbox. A submission is new until someone reads it. A dashboard card counts the new ones, and the new ones are in the admin's Inbox too, beside what else waits.
- Open a submission to read it: it opens beside the list (as a sheet on a phone) with every answer under its field's label, when it was sent and the consent, and opening it marks it read. Sent from names the page the form was on, while that page has an address on the site. Its History says when it was received, when the notification email went out and when it was marked read.
- Reply writes an email to the sender, from SHADE's email (Email).
- Delete removes one submission, after a confirmation. Delete all removes every submission of a form. It is removed for good, for example when someone asks for their data to be erased.
- Download CSV gives the submissions of a form in UTF-8, one column per field key. Values that start with
=,+,-or@, a tab or a line break get a quote mark in front, so spreadsheets do not run them as formulas. The download works only from a signed-in session, never with an API token, because it holds personal data.
The team's chats
Each submission can also tell the team's chats (Slack, Discord, Matrix or a webhook). An admin ticks the message
forms.submission on a channel (Channels). The message says which form was sent and
when, with a link to it in the inbox. It never holds the answers.
Each submission is emailed to the form's addresses, with one block per field, and the sender's address as reply-to.
The email's text is on the Messages screen (Modules group, forms.submission), where it can be changed. A failure
(including email not set up) is logged and never shown to the visitor; the submission is kept.
The sender's confirmation
With Send the sender a confirmation on, the address the visitor typed gets one email after the form is sent. It comes after the spam check and the proof of work, so a bot gets nothing. Publishing is refused while the form has no field with the purpose Email.
- The email holds a copy of what the visitor sent. Long free text is cut to a preview of 200 characters, and nothing in
it is clickable: dots and
://are defused, so an address or a link typed into a field cannot become a link. - While the person's contact is unconfirmed, the email also holds SHADE's Confirm your address link. Using it confirms the contact. A contact that is already confirmed gets no link.
- At most about 3 an hour are sent per visitor and per address. It is never marketing.
- The email's text is on the Messages screen (Modules group,
forms.confirmation), where it can be changed. A failure is logged and never shown to the visitor; the submission is kept.
On a website page
The module gives the website editor a Form starter with a pick. On the Components screen an admin adds the starter once per published form, choosing the form. Its fields come from the form as published, in the page's language, so a change to the form shows on the page when the form is published. The website editor has no form starter of its own any more, and no "send to a form" action: the module's starter does both.
A form control in the visual tree may have its name bound, checked when the page is rendered
(The tree).
Spam and bots
Visitors send a form to the module's public route. SHADE's spam check drops bots quietly: a hidden website field
that people leave empty, a minimum fill time, and 5 sends per address in 10 minutes
(Protection). Only a keyed hash of the address is kept.
On top of that, a form asks for a proof of work before it sends (ALTCHA). It runs on your own SHADE: no outside service and no third-party script. The visitor's browser works out the answer, well under a second, and the visitor sees nothing. A send without a good answer, or with one that was used before, is dropped quietly like spam. The Form starter does this by itself.
A form with a consent checkbox refuses a submission without it: the text must be the form's own, and it is kept with the time and shown in the submission.
Privacy and retention
Submissions are deleted automatically after a year (at least 30 days; admins can change it, see Data retention), or earlier by an editor.
The answer to a field with purpose email links the submission to a contact in People, unconfirmed until the person proves the address. A person's submissions are found and erased through their contact (Privacy).
AI tools
An AI assistant connected to SHADE over MCP gets four tools. They read and sort; forms are still built in the admin.
| Tool | What it does |
|---|---|
forms_list | The forms with their number of submissions and of new ones, and whether answers are allowed. |
forms_submissions | A form's submissions, newest first, at most 50. Optionally only the new ones. |
forms_submission | One submission. |
forms_mark_read | Marks submissions read or not read. This is the AI's only change. |
The three read tools need forms.ai.read, marking needs forms.ai.triage. The ai role has both.
By default the tools show a submission's form, when it was sent, whether it is read, its language and which fields
were filled in (keys and kinds), and never the answers: those are visitors' personal data. An admin can change that
with the module's setting Let AI tools read what visitors send (Modules, Forms, Settings). It is off by
default and holds for the whole instance. While it is on, forms_submissions and forms_submission also return the
answers (key, kind, label and value), so switch it on only if you are willing to hand visitors' answers to the AI
service you use. Each read with answers is written to the audit log as forms.ai.answers, with which submissions.
Switching the setting off counts at once, from the next call.
For developers
- Showing a form on your own frontend.
GET /api/v1/account/forms/published/<key>?language=<code>returns the published form: its fields by key with their purpose, the button, the message and the consent text, never the addresses. It is cached for a minute. The visitor's browser sends the answers toPOST /api/v1/account/forms/submit: the form's id, each field's value by key, the spam check'swebsiteandelapsedMs, the consent text and the page's language, and the proof of work's answer asaltcha. The starterstarters/lead-sitedoes exactly this (Frameworks). - The proof of work.
GET /api/v1/account/forms/challengeis public and gives a new challenge each time (60 a minute per IP; it runs out after 30 minutes). Solve it in the browser withsolveChallengefrom@shadestack/client/challenge, which returns the answer to send as the body fieldaltcha. Each answer works once. In a page's tree,callRoutewithchallenge: truedoes all of this before it sends, as the Form starter does. - Answers. Each published version has a JSON Schema of its answers.
- Hearing a submission. Each submission is the event
forms.submission.received:{ id, form: { id, key, version }, language, answers: [{ key, kind, role, value }], consent }. Another module hears it in its manifest'sonand filters onform.key(Module content). - Not yet. Connecting a form to a module per form, sending a submission again and a webhook with a form's answers come after 0.1.0.
- The code and its tests: the module's
README.mdin theshade-plugin-formsrepository.