Guide

GDPR-compliant contact form: notice template and code

A contact form collects personal data, so the GDPR applies from the first message. In practice you need three things: a legal basis, a short notice at the form and full details in your privacy policy. Below are templates and ready code.

Short answer: To answer a message you usually do not need consent. Legitimate interest (Art. 6(1)(f) GDPR) or steps before a contract (Art. 6(1)(b)) normally cover it. You still have to inform people (Art. 13). You need consent, as a separate unticked checkbox, only if you also want to send marketing.

Formgong·

Does a contact form need consent under the GDPR?

Usually not. When someone writes to you through the form and you reply, one of two legal bases normally applies:

  • Art. 6(1)(f) GDPR: your legitimate interest in answering enquiries and keeping the correspondence;
  • Art. 6(1)(b) GDPR: when the message is about a quote, an offer or an order, so you take steps at the person's request before a contract.

You need consent (Art. 6(1)(a)) if you want to use the data for more, such as a newsletter or offers. Then add a separate checkbox that is not ticked in advance and does not block sending. Marketing by email or phone is also governed by national ePrivacy rules, which vary between EU countries, so check the rules where you operate.

The duty to inform: what goes where

Art. 13 GDPR requires you to inform people when you collect the data. For forms, a layered approach works well, as the EU transparency guidelines (WP260) suggest. Put a short notice right at the form, with a link to the full details in your privacy policy.

The full details include:

  • who the controller is and how to reach them, and the data protection officer if you have one;
  • the purposes and legal bases;
  • the recipients and any transfers outside the EEA;
  • how long you keep the data;
  • the person's rights, including the right to complain to a supervisory authority;
  • whether giving the data is optional.

Template: short notice at the form

Place this text right above or below the Send button. Fill in the parts in square brackets.

Template: short notice at the form
[Company name], [address], [email] is responsible for your data. We use the details you enter in this form to answer your enquiry (Art. 6(1)(f) GDPR) and, if you ask about an offer, to take steps before a contract (Art. 6(1)(b) GDPR). More information, including your rights, is in our [privacy policy].

Template: section for your privacy policy

Add this section to your privacy policy. Adjust the parts in square brackets to your situation and delete points that do not apply.

Template: section for your privacy policy
Contact form

1. Controller: [Company name], [address], email: [email address]. [Data protection officer: [contact], if appointed.]
2. Purpose and legal basis: to answer your enquiry sent through the contact form, based on our legitimate interest in the correspondence (Art. 6(1)(f) GDPR). If your enquiry concerns an offer or an order: steps before a contract (Art. 6(1)(b) GDPR). [We send marketing only with your consent (Art. 6(1)(a) GDPR).]
3. Recipients: service providers that process data on our behalf: form processing (Formgong, submissions stored in the EU), email [provider], hosting [provider]. [If notifications go to Telegram, the content of the enquiry is also processed by Telegram, including outside the EEA.]
4. Transfers outside the EEA: [We do not transfer data outside the EEA] / [We transfer data to: …, on the basis of: …].
5. Retention: until the correspondence ends, then [for example 12 months] for follow-up questions or to defend legal claims.
6. Your rights: access, rectification, erasure, restriction of processing, objection to processing based on legitimate interests and data portability (where processing is based on a contract or consent). You can withdraw consent at any time; this does not affect processing before the withdrawal.
7. Right to complain: you can complain to a data protection supervisory authority, in particular in the member state where you live, work or where the alleged breach took place. [Competent authority: …]
8. Optional data: giving your data is voluntary. Without an email address or phone number, however, we cannot reply.
9. Automated decisions: we do not make solely automated decisions with legal effects. [If enquiries are scored automatically, for example by AI, briefly describe the purpose.]

Template: quote, booking or appointment form

When someone asks for a price, a booking or an appointment, you take steps at their request before a contract. Art. 6(1)(b) GDPR covers that even if they never book, so no consent checkbox is needed. Keep the phone number optional if email is enough. For the reasoning behind these templates and ten more kinds of forms, see GDPR for website forms: what each type of form needs.

Notice next to the form
[Company name], [email] is responsible for your data. We use the details in this form to prepare your quote or booking and, if you go ahead, to carry it out (Art. 6(1)(b) GDPR). More information, including your rights, is in our [privacy policy].
Paragraph for your privacy policy
Quote and booking requests

We use the details you send through the quote or booking form (name, contact details, [date, address of the job], your message) to prepare an offer or a booking at your request and, if you go ahead, to carry out the contract. Legal basis: Art. 6(1)(b) GDPR. If no contract follows, we delete the request after [for example 6 months]. If it does, we keep the data for as long as the contract runs and keep invoices for as long as tax law requires (Art. 6(1)(c) GDPR). Recipients: [form service, email provider, booking calendar]. Giving the data is voluntary, but without contact details we cannot send you a quote.

Template: newsletter or marketing opt-in

Marketing emails need consent under Art. 6(1)(a) GDPR and under the national rules based on the ePrivacy Directive. On a form that does something else, such as a contact or order form, that consent is a separate checkbox: not ticked in advance and not required to send. Keep a record of when and how each person signed up, because Art. 7(1) GDPR asks you to be able to show it.

Notice next to the form
[ ] Yes, send me [the monthly newsletter / news and offers] from [Company name] by email. I can unsubscribe at any time with the link in every email. Details: [privacy policy].
Paragraph for your privacy policy
Newsletter

If you sign up, we use your email address [and first name] to send you [the newsletter / news and offers about our products]. Legal basis: your consent (Art. 6(1)(a) GDPR). We record the time of sign-up [and your confirmation] so we can show that you agreed. You can withdraw your consent at any time with the unsubscribe link in each email or by writing to [email]; this does not affect emails sent before. [After you unsubscribe, we keep your address on a block list only so that we do not email you again (Art. 6(1)(f) GDPR).] Recipients: [newsletter service].

Template: job application with CV upload

An application is a step towards an employment contract, so Art. 6(1)(b) GDPR is the usual basis, and national employment law may add rules. Do not base the application itself on consent: the EDPB doubts that job seekers feel free to refuse an employer. An optional checkbox fits only for keeping the CV for future roles. Ask people to leave out health details, photos and anything else you do not need.

Notice next to the form
[Company name], [email] is responsible for your data. We use your application and CV to assess you for this role (Art. 6(1)(b) GDPR) and delete them [6 months] after the role is filled. Please do not include health details or other information we did not ask for. More information is in our [privacy policy].

Optional checkbox, not ticked in advance:
[ ] Keep my application for [12 months] and contact me about other roles. This does not affect this application.
Paragraph for your privacy policy
Job applications

We use the details and documents you send with your application (name, contact details, CV, cover letter [, other documents]) to assess your application and decide whether to employ you. Legal basis: Art. 6(1)(b) GDPR [and the applicable employment law]. Only the people involved in hiring see your application. If we do not hire you, we delete your application [6 months] after the process ends, unless you agreed that we may keep it for future roles. In that case we keep it for [12 months] based on your consent (Art. 6(1)(a) GDPR), which you can withdraw at any time. Recipients: [form service, email provider, applicant tracking system]. Giving the data is voluntary, but without it we cannot consider your application.

Template: form with file uploads

An upload serves the same purpose as the rest of the form, so it needs no checkbox of its own. Files can hold far more than you need, though: an ID scan, a photo of an injury, a whole CV. Say which files you want, what to leave out and when you delete them. How uploads are checked and stored in Formgong is in contact form with file upload.

Notice next to the form
Please attach only the files we need for your request ([for example photos of the damage]) and leave out ID documents and health information. We delete attachments together with your request. Details: [privacy policy].
Paragraph for your privacy policy
Attachments

If you attach files to your request, we use them only to handle that request, on the same legal basis as the request itself (Art. 6(1)(b) or (f) GDPR). Files are stored [with our form service, in the EU] and are not public. We delete them together with the request, at the latest [period] after it is closed. Recipients: [form service, email provider].

Ready HTML form with a privacy notice

The form has name, email and message fields, a short notice with a link to your privacy policy and an optional marketing checkbox: not ticked and not required. Replace fk_your_access_key with the key from your Formgong dashboard and the link with your privacy policy URL. If you do not send marketing, remove the checkbox.

HTML
<style>
  .fg-form label { display: block; margin: 0 0 12px; }
  .fg-form input:not([type="checkbox"]), .fg-form textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 10px; font: inherit; }
  .fg-form textarea { min-height: 120px; }
  .fg-form small { display: block; margin-top: 10px; opacity: .75; }
</style>
<form class="fg-form" action="https://formgong.com/submit" method="POST">
  <input type="hidden" name="access_key" value="fk_your_access_key">
  <input type="hidden" name="_lang" value="en">
  <input type="hidden" name="_subject" value="New message from the contact form">
  <label>Name <input type="text" name="name" autocomplete="name" required></label>
  <label>Email <input type="email" name="email" autocomplete="email" required></label>
  <label>Message <textarea name="message" required></textarea></label>
  <label><input type="checkbox" name="marketing_consent" value="yes"> I would like to receive news and offers by email. I can withdraw this consent at any time.</label>
  <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)">
    <label>Leave this field empty<input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label>
  </div>
  <button type="submit">Send</button>
  <small>By sending this form you give us your details so we can reply. Details: <a href="/privacy-policy">privacy policy</a>.</small>
</form>

The hidden botcheck field is a trap for bots (a honeypot): people do not see it, and submissions that fill it in go to spam. If you are still choosing where submissions should go, see GDPR form backend: 7 checks before you choose.

Form provider and data processing agreement (DPA)

When an outside service processes your enquiries, you are the controller and the provider is your processor. Art. 28 GDPR then requires a data processing agreement.

With Formgong:

  • submissions are stored in Cloudflare D1 with EU jurisdiction, and email is sent through UniOne in the EU (with Formgong’s own mail server in the EU as the fallback);
  • we store the sender's IP address only as a hash;
  • Telegram processes messages under its own terms, and some optional features may process data outside the EU. If you turn them on, mention them in your privacy policy;
  • a standard DPA under Art. 28 is part of the terms and is accepted when you create an account, with no separate signature. Read it to check that it suits you. Processing details are on the where data is stored page.

Data minimisation and retention

The data minimisation principle (Art. 5(1)(c) GDPR) means: ask only for what you need to reply. For a normal enquiry, a name, an email or phone number and the message are enough. Leave out a date of birth or postal address unless you need it.

The retention period in your privacy policy must also happen in practice. In Formgong you set it in the dashboard. On the Free plan submissions are kept for 30 days. On Pro you choose 30, 90 or 365 days or unlimited.

Common mistakes

  • A pre-ticked consent checkbox. Consent given that way is not valid.
  • Making marketing consent a condition for sending an enquiry. The form must work without it.
  • Treating an “I accept the privacy policy” checkbox as consent. Reading a notice is not consent; the notice text itself meets the duty to inform.
  • A privacy notice hidden so well that nobody sees it at the form.
  • Collecting data “just in case” and never setting a deletion period.

This text is general information, not legal advice. Adapt the templates to your business and, if in doubt, have them checked by a lawyer or your data protection officer. The UK GDPR and other national laws may add their own rules.

Questions

Does a contact form need a consent checkbox?

Usually not. To answer an enquiry, legitimate interest (Art. 6(1)(f) GDPR) or steps before a contract (Art. 6(1)(b)) is normally enough. You need consent if you want to use the data for other purposes, such as a newsletter.

Should a privacy checkbox be required to send the form?

No. Marketing consent must be freely given: not ticked in advance and not required. You meet the duty to inform with a notice at the form, not with a checkbox.

Where does the privacy notice go?

A short notice right at the form and the full details in your privacy policy, linked from the short notice.

How long can I keep contact form data?

The GDPR sets no fixed number. Keep the data only as long as the purpose needs. State that period in your privacy policy and stick to it, for example with automatic deletion.

Do I need a DPA with my form provider?

Yes, if an outside service stores or processes submissions on your behalf (Art. 28 GDPR). Formgong's standard DPA is part of its terms.

Sources

Checked on 19.10.2026 against these public pages: GDPR, text on EUR-Lex, European Data Protection Board (EDPB), WP260 guidelines on transparency, EDPB Guidelines 05/2020 on consent, EDPB Guidelines 2/2019 on Art. 6(1)(b).

← Formgong