Adds the contact form with the live fields, validation and browser-side anti-spam, behind a coming-soon notice with a mail button until the API exists. A "Boek" link on a price card selects its package, tidies the URL and moves focus to the form. The form loads only when it comes near the screen, so the hero does not wait for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.9 KiB
Functional Design Plan — Unit 5: Contact
Scope: FR-HP-06 (form), FR-HP-07 (coming-soon gate), FR-HP-08 (anti-spam, browser side), FR-HP-09 (robot-check slot), and BR-PARAM-02…04 from unit 3 (applying and removing ?pakket=). Questions: contact-fd-questions.md.
Already fixed by requirements and earlier design (no question): fields Naam, E-mail, "In welke shoot heb je interesse?" (package names + Overig), "Stel hier je vraag"; button "(Aan)vraag versturen"; gate on by default via siteContent.contactForm.enabled = false, form dimmed and inert, notice "Het contactformulier komt binnenkort. Mail me voor nu op info@andreaslop.nl" with a mail button; address assembled in the browser; honeypot + ±3 s time check, spam gets the normal success and nothing is sent; submitContactForm adapter (rejects generically today); Friendly Captcha later; last "Boek" click wins; ?pakket= removed from the URL once applied.
- 1. Collect and analyze answers (follow-up questions if needed)
- 2.
domain-entities.md—ContactValues,ContactPayload,ContactErrors,ShootOption, field limits,siteContent.contactForm - 3.
business-rules.md— validation rules and messages, when errors appear and disappear, spam rules, submit states (idle, sending, sent, failed), gate on/off, mail link, preselection and URL clean-up, focus after "Boek"; decision flowcharts - 4.
business-logic-model.md— submit sequence, the form state machine, pure functions (shootOptions,validateContact,toContactPayload,isLikelySpam,mailtoLink), PBT-01 properties incl. a stateful check of the form states (PBT-06) - 5.
frontend-components.md—ContactSection,ContactFormGate,ContactForm; props, states, layout, accessibility - 6. Validate against FR-HP-06…09, BR-PARAM-02…04, NFR-HP-01/03/04 and the Security/PBT extensions