Sub topic 5
Designing a compliant sign-up form
This chapter assumes you know what consent is, how GDPR/ePrivacy, CAN-SPAM, and CASL differ, and the criteria for valid consent: freely given, specific, informed, and unambiguous. It applies those criteria to a real artifact, the sign-up form. It is general education, not legal advice.
What the form has to do
A sign-up form is the point where you collect consent and your first piece of evidence. Regulators and complainants look at the form first. If it fails, everything downstream (confirmation emails, records, campaigns) rests on weak ground.
A compliant form does four jobs:
- It asks for the minimum data needed to send what you promise.
- It asks for permission with a clear, affirmative action by the user.
- It tells the user who you are, what you will send, and how to withdraw.
- It leaves behind enough information to prove what the user saw and did.
The rest of the chapter works through each job. Double opt-in and record keeping get their own chapters, so they appear here only where the form feeds them.
A baseline compliant form
Here is a form that meets the criteria under the strictest of the three regimes, which is the usual design target if you have an international audience.
<form action="/subscribe" method="post">
<label for="email">Email address</label>
<input type="email" id="email" name="email" required>
<label>
<input type="checkbox" name="consent_newsletter" value="yes">
Email me the monthly Example Co. product newsletter. You can unsubscribe at any time.
</label>
<p>We use your email address only to send the newsletter. See our <a href="/privacy">privacy notice</a>.</p>
<button type="submit">Subscribe</button>
</form>Note what is present and what is absent:
- The checkbox has no
checkedattribute. The user must tick it. - The label names one purpose (a monthly product newsletter) and the sender (Example Co.).
- The email field is
required. The checkbox is not markedrequiredin the HTML, because the server must decide what to do when it is empty (see the next section). - A privacy notice link sits next to the form, and the sentence above the button says what the address is used for.
- Nothing is hidden behind a "more options" toggle or in small grey text.
Server-side validation of the checkbox
The browser cannot enforce consent. Your server must. Treat the checkbox as the only valid signal and never infer consent from anything else, such as the user filling in the email field.
def handle_subscribe(form: dict) -> str:
email = form.get("email", "").strip().lower()
if "@" not in email:
return "invalid_email"
if form.get("consent_newsletter") != "yes":
return "no_consent" # do not add to the list
return "pending_confirmation"If the checkbox is empty, the correct result is that the address is not added to the marketing list. You may keep the address briefly for another stated purpose, but only if the form said so. Do not silently add it with a "not consented" flag and then mail it later.
Pre-ticked boxes and other defaults
Consent needs a clear affirmative act. In the EU, the Court of Justice ruled in the Planet49 case (2019) that a pre-ticked checkbox does not produce valid consent. Silence, inactivity, and default settings do not count. The UK follows the same approach.
The same logic applies to design tricks that achieve a pre-ticked result by other means:
| Pattern | Problem | Fix |
|---|---|---|
| Pre-ticked box | No affirmative act | Leave unticked |
| "Untick to opt out" wording | Reverses the default | Phrase as "Tick to receive..." |
| Hidden or tiny checkbox | Not informed or unambiguous | Make it as visible as other fields |
| Consent implied by clicking "Submit" | Action is not specific to consent | Add a separate checkbox or a clearly labelled button |
| Dark patterns, such as a bright "Accept" button next to a grey "No thanks" | Not freely given | Give choices equal visual weight |
CAN-SPAM does not require prior consent, so a pre-ticked box is not illegal there on its own terms. CASL, though, requires express consent that is not pre-checked, and the FTC treats deceptive design as a separate problem. Designing for the strictest rule keeps one form usable everywhere.
Specific purposes and no bundling
Consent must be specific. If you want to send a newsletter, share data with partners, and run profiling, those are three purposes. They need three separate choices.
Bundling happens in two common ways:
- Bundling purposes. One checkbox reads "I agree to receive offers and to share my data with selected partners." The user cannot accept one and refuse the other.
- Bundling with a service. Account creation, a download, or a purchase is made conditional on marketing consent when marketing is not needed to deliver it. This undermines the "freely given" criterion. GDPR asks whether the consent is truly a free choice when the service is conditional on something it does not need.
A better layout separates them:
<fieldset>
<legend>Choose what you want to hear about</legend>
<label>
<input type="checkbox" name="consent_newsletter" value="yes">
Monthly product newsletter
</label>
<label>
<input type="checkbox" name="consent_offers" value="yes">
Occasional discount offers
</label>
</fieldset>Each box maps to a separate field in your database. Later chapters cover how these become preferences and how you record them.
A related edge case is a free download in exchange for an email address (a "lead magnet"). It is usually acceptable to require the email address to deliver the download, because you need somewhere to send it. It is not acceptable to require marketing consent for the same download. Collect the address for delivery, and offer the newsletter as a separate, unticked option.
Being informed: what the user must be told
For consent to be informed, the user needs to know at least:
- Who is asking. Name your organization. Under GDPR, name any other controllers who will rely on the consent.
- What you will send, and roughly how often.
- That they can withdraw, and how.
- Where to read the full privacy notice.
CASL adds a specific requirement: the request must identify the sender, give contact details (a mailing address plus one of a phone number, email, or web address), and state that the user can unsubscribe. CAN-SPAM places a similar identity requirement on the messages themselves, namely a valid physical postal address in each email.
Put the key information beside the checkbox, in plain language. A link to a 30-page policy is useful as a second layer, but it should not carry information the user needs to make the choice.
Layered notices
A practical pattern is two layers. The first layer sits next to the form and answers who, what, and how to withdraw in two or three lines. The second layer is the privacy notice and covers the legal basis, retention, recipients, and the user's rights. The baseline form above uses this approach.
Language and accessibility
Consent wording must be clear and written in the language of the page. If your site is in German, the consent text should be in German. A few further points matter more than they first appear:
- Use plain verbs: "Email me..." rather than "I acknowledge and consent to the processing of...".
- Do not use double negatives such as "Don't uncheck this box if you do not want to not receive...".
- Associate every label with its input, either by wrapping the input in the label (as above) or with
forandid. This makes the whole label clickable and lets screen readers announce it. - Ensure keyboard users can tick the box and submit the form.
- Keep the text readable on small screens. Consent text hidden below the fold on mobile is a common failure.
Collecting only what you need
Data minimization applies to the form too. If you only need an email address to send a newsletter, do not require a phone number, date of birth, or job title. Optional fields should be clearly marked optional, and each one should have a stated purpose.
Be careful with fields that sound harmless but expand your obligations. A date of birth can reveal that the user is a child, and many jurisdictions restrict consent from minors. If you target or may attract children, check the local age of digital consent, which varies across EU member states from 13 to 16.
What to capture at submission
At the moment of submission, your server should capture the evidence you will need later. At minimum, store:
- The email address.
- The exact consent text shown, or a version identifier that points to it.
- The URL or form where it was collected.
- The method (for example, unticked checkbox).
- The timestamp, in UTC.
A later chapter covers record design in detail. For now, the design rule is that your form must be versioned. If you change the wording, give the new wording a new version ID so old records still point to the text those users actually saw.
from datetime import datetime, timezone
CONSENT_TEXT_VERSION = "2026-11-v3"
CONSENT_TEXT = (
"Email me the monthly Example Co. product newsletter. "
"You can unsubscribe at any time."
)
def build_consent_record(email: str, source_url: str) -> dict:
return {
"email": email,
"purpose": "monthly_newsletter",
"consent_text_version": CONSENT_TEXT_VERSION,
"consent_text": CONSENT_TEXT,
"source_url": source_url,
"method": "unticked_checkbox",
"collected_at": datetime.now(timezone.utc).isoformat(timespec="seconds"),
"confirmed_at": None,
"withdrawn_at": None,
}
print(build_consent_record("[email protected]", "https://example.com/newsletter"))The confirmed_at field stays empty until the user clicks a confirmation link. That is the subject of the next chapter.
How the form fits into the flow
Common mistakes
- Treating the form as the whole job. A good form does not fix a missing record or a hard-to-find unsubscribe link.
- Changing wording without versioning. You can no longer show what earlier subscribers agreed to.
- Re-using a checkbox for a new purpose. Someone who ticked "newsletter" has not agreed to "partner offers", even if the same box exists in your database.
- Pre-filling forms from other sources. Autofilled or imported email addresses, such as from a CRM, do not carry consent into a new marketing purpose.
- Collecting consent in a modal that blocks the page. If dismissing the modal is the only way to continue, the choice may not be free.
- Letting the front end decide. JavaScript can be bypassed, so check the consent field on the server.
Testing your form
Before launch, walk through the form as a regulator would:
- Load the page. Is anything pre-ticked?
- Read the consent text alone. Does it name the sender, the purpose, and how to withdraw?
- Submit with the box unticked. Does the address stay off the marketing list?
- Submit with the box ticked. Does a record appear with the right text version and timestamp?
- Change the wording in a test. Does the version ID change?
- Try the form with only a keyboard and with a screen reader.
Exercise
A signup form has a single checkbox, already ticked, labelled "I agree to receive offers from us and our partners." It is shown under a "Create account" button. List three problems with it and the fix for each.
Show answer
(1) The box is pre-ticked, so there is no affirmative act. Fix: leave it unticked. (2) "Us and our partners" bundles two purposes and names no partners, so consent is neither specific nor informed. Fix: use separate boxes and name the sender (and any other controllers). (3) Placing marketing consent inside account creation suggests it is a condition of the service, so it may not be freely given. Fix: make marketing consent optional and separate from "Create account".
Exercise
Your server receives a POST with a valid email but no consent_newsletter field. What should happen, and why should the check be on the server rather than only in the browser?
Show answer
The address should not be added to the marketing list, and no marketing email should be sent. The server must check because client-side checks can be bypassed (by disabling JavaScript or posting directly), and the server is the only place that can guarantee a consent record exists before any list entry is created.