The success tip doesn't mean the message has arrived.
Many contact forms do only one thing: click and show "submit successful." The mail interface is time-consuming, the database writing failed, the inbox turns the notice to spam, and the user still sees green hints. A reliable form must define a successful boundary: at least the data has been accepted and sustained by the server, preferably with a traceable number; the mail is only a notification channel and should not be a single copy. If you simply want your readers to report an article that is wrong, your name, company, telephone, and budget are not always filled out.
Field names to help fill in, not to help the database
Visible tab with " Your Mailbox " , do not name the field inside contact_email As an interface. Placed text is not a substitute for a label, and when entered it disappears. You have to be clear about filling and selecting, the format requires a statement before input, and the user is told how to correct the error, rather than just " illegal parameter " . Use email, url, tel The preend check is for timely feedback, and the server must check all fields again, limit length and store safely.
The server handles the submission using a clear state machine
One submission can go through. received, validated, stored, notified, handled. The minimum record of receipt time, source page, processing status, and error summary, without passwords, complete tokens, etc. The data is kept in the list to be processed when the mail is sent, and the monitor alert is sent. The interface returns the unlost step before it is successfully returned. If storage is a core, writing fails to return the error; if notification fails but the record is saved, the user is told to “receive it, we will process it” and mark the notification anomaly at the backstage.
Re-clicking and re-testing are predictable.
Submits the buttons to a processing state after clicking, but they cannot be used simply to disable the buttons, because the mobile network may try again to request. To submit the generation buttons, the server identifies the same request for a short time; and returns the same number after success, instead of creating multiple records. Retains the non-sensitive content that the user has filled out after the error, moving the focus to the error summary or the first error field. Do not allow a single mailbox to be formatted wrongly empty the entire table.
Anti-waste is on a risk-by-risk basis
First level is hidden honey can field, reasonable minimum time to fill,IP The second level is a score for duplicate text, the number of unusual links and known waste patterns. Only when the amount of waste actually affects its use, the certificate code is introduced; the certificate code increases normal user costs and also takes into account the availability of the Chinese network environment, accessibility and privacy. Do not send all form data to non-transparent third parties because of waste prevention.
Privacy statement closes to the submission button
Describes what information is collected, what it is used for, how long it is stored, who can access it, and how it is requested to be deleted. If a user ticks a marketing subscription, it must be separated from the completed consultation and cannot be checked by default. IP, User-Agent And the content, the clean-up strategy is to cover the log, not just the business database. In particular, promotional or advisory forms avoid implying that users should also be able to read the open curriculum without submitting a phone.
Do a break-net check before you get on the line.
Simulates separately: you have to fill in empty, mailbox error, too long content, quick repeat clicks, failure of mail services, database failure, cellular network interruption. Confirm that the interface is not misreported, you can see the pending records at the back desk, the log does not disclose the text or key. Go through the keyboard and screen readers for tags and bug tips. Compares the number of submissions, the number of valid numbers, the number of notification failures and the average processing time after a steady running week, rather than just looking at button clicks. The next search technology check at the page level:Title,Canonical Structured data and index boundaries.
Sources
- Client-side form validationMDN Web Docs
- How to Meet WCAG 2.2W3C Web Accessibility Initiative