Appearance
Forms
Contact forms in the Contact Form 7 format, with Flamingo messages and mail, kept free of spam by a honeypot, Cloudflare Turnstile, hCaptcha or reCAPTCHA v3, and Akismet.
kitloom/ · admins: kitloom/, kitloom/
Video lessons
Recorded in the Filament admin; the Nova admin works the same way.
Contact Form 7 forms on a kitloom site: the shortcodes that draw them, taking a submission, mailing it and keeping it. Forms stay where the plugin keeps them and messages where Flamingo keeps them, so a site moved from WordPress brings both along, and nothing here needs a table of its own.
The admins are kitloom/ and kitloom/.
In the visual editor of either admin, «Shortcode» → «Contact form» picks a published form by its title and puts its shortcode into the text, the title included as Contact Form 7 writes it; a click on the shortcode there picks another form.
The data
| What | Where |
|---|---|
| A form | a wpcf7_ post |
Its template, [text* your- and the rest | _ meta (the content keeps a copy) |
| Its mails | _ and _ meta: recipient, sender, subject, body, additional headers, use_, exclude_, active |
| The texts a visitor sees | _ meta, by the plugin's keys (mail_, invalid_, …) |
| Additional settings | _ meta, name: lines |
| What a shortcode finds it by | _ meta, given on the first save |
| A message | a flamingo_ post: _ meta per field, _, _, _, _ (IP, user agent, page, date) |
| The form a message came from | its flamingo_ term, under "Contact Form 7", with the form's slug |
Arrays are written as JSON and read in WordPress's serialized format too.
On the site
[contact- (or the older [contact-) finds the published form by the start of its hash or by its post ID. Its data for the theme is the template with each form-tag turned into a field shortcode — [text], [email], [url], [tel], [number], [date], [textarea], [select], [checkbox], [radio], [acceptance], [submit] — whose arguments say what to draw: name, value, required, placeholder, options, multiple, and the rest of the tag's options. Other tags ([file], [quiz]) stay as text.
The shortcode's data also has action: the address the theme posts the fields to, POST / — the plugin's own route, under the site's REST root (kitloom/site). The fields go as the form posts them, form-encoded or JSON, a checkbox group as a list; no session and no CSRF token, kitloom- submissions a minute from one address (10). The answer is the plugin's:
json
{ "contact_form_id": 12, "status": "validation_failed", "message": "One or more fields have an error…",
"invalid_fields": [{ "field": "your-email", "message": "The field is required.", "into": "span.wpcf7-form-control-wrap[data-name=\"your-email\"]" }] }status is mail_, validation_, spam or mail_, always with 200; an unknown form is wpcf7_ (404). routes. turns the route off.
In another language
With kitloom/languages a form follows the page's language: its placeholders, the choices of a list, the acceptance sentence, the buttons, the text around the fields and the messages after sending come from the form's Translations tab — one per language, with Translate with AI. A submission is checked against the words the visitor saw, and a translated choice still says in mail what the original says, so the mail you get is the same in every language. The messages a form keeps as they came — the defaults — are this package's words, translated for the visitor (lang/) until the tab says otherwise.
A form offers its words through Kitloom\ (Form, keys like form., form., messages.) and reads them through Text: without a translation module the form is as written.
A submission
- Spam protection decides whether to take it at all (below). A submission made in code —
Submissions::without a request — is not asked.submit() - Each field is checked against its tag — required, email, URL, telephone, number and date ranges, length, a choice the form offers — and only the form's own fields are kept.
- The message is stored as Flamingo's, unless
do_, andnot_ store: true Kitloom\is dispatched — Contact Form 7'sForms\ Events\ Submission Received wpcf7_— with the submission and the stored message, whatever the mail does next (kitloom/notifications tells the owner).before_ send_ mail - The mails are queued through the application's mailer (or
kitloom-), mail-tags filled —forms. mailer [your-,name] [_,raw_ topic] [_,site_ title] [_,site_ admin_ email] [_,date] [_,remote_ ip] [_— unlessurl] skip_.mail: on demo_skips both.mode: on Kitloom\is dispatched — Contact Form 7'sForms\ Events\ Submission Sent wpcf7_— with the submission and where it came from, for a module that acts on what was sent (kitloom/newsletter's "subscribe me" box). Spam, an invalid form or a failed mail never reaches it.mail_ sent
The pieces are public for a site that draws or takes forms its own way: Forms finds a form, Submissions takes a submission, Form reads and writes a form as an admin edits it.
Spam protection
Up to four checks, cheapest first: the honeypot, then the captcha, then Akismet, with a limit on how often one address may send around them all. A submission that fails one gets the form's "spam" text (Your message could not be sent. unless the form changes it) and leaves no message and no mail.
Everything is set on the Settings page of the forms section in either admin (Contact → Settings in Filament, Contact Forms → Settings in Nova). Only administrators open it (the manage_ permission). What is saved there is used; until then the config is, so a site that keeps its keys in . goes on as it was. Every secret and the Akismet key are stored encrypted with the application key and never shown again: leave the field empty to keep what is saved, type a new one to replace it. Agents cannot read or change them.
The honeypot
spatie/laravel-honeypot: a field people never see and bots fill in, and the time the form was drawn — sent sooner than HONEYPOT_ (1) after it, or with the fields missing, it is a bot. Visitors never notice it. On by default; off on the Settings page or with KITLOOM_. It gets along with the page cache: a cached form was only drawn earlier.
The limit
Submissions a minute from one address: 10 unless changed on the Settings page; 0 is no limit. One more is answered "too many requests".
The captcha
Choose one under Captcha: Cloudflare Turnstile (the default), hCaptcha, Google reCAPTCHA v3, or None. The chosen one works once both of its keys — a site key and a secret key — are saved; until then nothing is drawn. Only the chosen one's keys are asked for (in Nova every pair is on the page, the ones not in use say so); keys saved for another captcha stay for when you switch back.
| Captcha | What the visitor sees | Where the keys come from |
|---|---|---|
| Cloudflare Turnstile | Mostly nothing, sometimes a box to tick | dash.cloudflare.com → Turnstile → Add widget, with the site's domain |
| hCaptcha | A box to tick, and a picture puzzle when hCaptcha is unsure | dashboard.hcaptcha.com → Sites → Add new site (the site key); the secret is in the account's settings |
| Google reCAPTCHA v3 | Nothing: Google scores every submission from 0.0 (a bot) to 1.0 (a person) and one below 0.5 is refused | google.com/recaptcha/admin → a new site of the type "Score based (v3)", with the site's domain; v2 keys do not work |
Or in ., used while no site key is saved for that captcha on the page (empty the site key there to go back to .):
dotenv
KITLOOM_FORMS_CAPTCHA=turnstile # hcaptcha, recaptcha, none
KITLOOM_FORMS_TURNSTILE_SITE_KEY=0x4AAAAAAA...
KITLOOM_FORMS_TURNSTILE_SECRET=0x4AAAAAAA...
KITLOOM_FORMS_HCAPTCHA_SITE_KEY=...
KITLOOM_FORMS_HCAPTCHA_SECRET=...
KITLOOM_FORMS_RECAPTCHA_SITE_KEY=...
KITLOOM_FORMS_RECAPTCHA_SECRET=...
KITLOOM_FORMS_RECAPTCHA_THRESHOLD=0.5A captcha's keys go as a pair: the page's once a site key is saved there, else .'s. When the captcha's service cannot be reached, submissions are refused and the error is reported, rather than let through.
Akismet
Akismet reads what a message says and who sent it and tells spam from real messages — the spam a person types by hand, which a captcha lets through. It is asked last, after the honeypot and the captcha. Its key is on akismet.com, your account → API key; paste it into Akismet API key on the Settings page, which checks it with Akismet before saving and refuses one Akismet does not know. A site that came from WordPress needs nothing: while no key is saved on the page, the key WordPress's Akismet plugin saved (wordpress_) is used — read, never changed. Else KITLOOM_ in .. No key anywhere — Akismet is not asked.
What it judges:
- a contact form — its fields as Contact Form 7 marks them: a field with the option
akismet:is the sender's name,author akismet:their email,author_ email akismet:their site (author_ url [text* your-,name akismet: author] [email* your-); the other text fields (email akismet: author_ email] text,textarea) are the message. A form with neither a message nor an author field is not sent to Akismet. - a comment or a review, and any other form of the site that asks the same protection — the name, email, site and words the visitor typed (a signed-in visitor's account name and email).
With every message go the visitor's address, browser and the page they came from.
A submission Akismet calls spam is refused with the form's spam text, like a failed captcha: it is not kept — there is no spam folder to look through afterwards, for messages or for comments. When Akismet cannot be reached, the message goes through and the error is reported: the honeypot and the captcha have already had their say.
Akismet learns from you: a comment marked as spam, or a contact message moved to Spam, is reported to it as spam it missed; one taken out of spam (approved, waiting for approval, or back to the Inbox) as a mistake. Spam sent to the trash teaches nothing. This is sent after the page has answered, so nobody waits for it and no queue worker is needed.
In the theme
The theme draws what the form's data says under protection, each null when off, and posts it with the fields:
honeypot(name,Field Name valid,From Field Name encrypted) — two inputs hidden with CSS, notValid From type="hidden", the first left empty;captcha(provider,site) —Key turnstile: a.element, which the widget fills withcf- turnstile cf-;turnstile- response hcaptcha: an.element, which postsh- captcha h-;captcha- response recaptcha: no element — as the form is sent,grecaptcha.and the token posted asexecute(site Key, {action: 'submit'}) g-;recaptcha- response turnstile(site) — the same key again when the captcha is Turnstile, for a theme that knows only Turnstile.Key
The captcha's script lands in @site of a page that drew such a form (reCAPTCHA's with ?render=<site); a Vue or React theme loads it itself. Akismet draws nothing.
The same checks guard the site's other forms — comments, reviews, bookings — through kitloom/site's Form, with the same switches and keys; a module that asks needs no forms package, and gets them once this one is installed. Akismet reads their fields under the comments' names (author_, author_, author_, content).
An application with its own idea binds Contracts\: its guard replaces all the checks for the contact forms, and protection stays empty. Allow takes everything, for a site that stops bots elsewhere.
AI agents
With kitloom/ai installed, an agent reads the forms with their shortcodes and fields (forms_) and the messages they received (submissions_, the inbox or the spam box) with read_; with manage_ it reads a form's template (form_), creates a form (form_, mailing the site's admin email as a new form in the admin does — where messages go is a person's choice) and changes its title or template through Forms (form_) and moves a message to the spam box or back (submission_). Nothing is deleted. kitloom- false — no form tools.
Personal data
With kitloom/privacy installed, Tools → Export Personal Data hands a person every message sent from their address — the inbox, the spam and the trash: the form, the subject, when it was sent, each field by its label and where it was sent from. Erase Personal Data deletes those messages for good, as Flamingo does — a message is only what its sender wrote — and the forms' inbox counts follow. Other people's messages that mention the address are left alone. kitloom- false — the module does not take part.
Configuration
config/: mailer, spam (honeypot, captcha, turnstile, hcaptcha and recaptcha with site_, secret, timeout, recaptcha., akismet., akismet., akismet.), routes (register, throttle), and the switches shortcodes., filament., nova., ai., privacy..