Form Data Security: What You Collect and How Long You Keep It

The safest data is the data you never collected. Before encryption and access control, think about what you actually need.

Discussions of form security usually start with encryption, but the most effective step comes one step earlier.

1. Minimization: what not to collect at all

Every field you collect is a liability. For each field, ask: if this data leaked tomorrow, what would happen? And will I actually use it?

Common examples of pointless collection:

  • The national ID number, when all you wanted was to prevent duplicates (a mobile number would have done).
  • The full date of birth, when you only needed an age bracket.
  • The exact address, when the city was enough.

2. What gets collected automatically

Besides the answers, the IP address, browser details and timestamps are usually stored too. They're useful for anti-spam but problematic in an anonymous survey: inside an organization, an IP address can be traced to a person.

If your survey is anonymous, turn off IP collection and tell respondents that you have.

3. Who can see it

Access to responses should be role-based. Someone who only needs the aggregate report shouldn't have access to individual responses.

And review access periodically. People move to other teams, but their access tends to stay behind.

4. How long to keep it

Data kept forever is a risk that keeps growing. Set a retention period for every form, and delete the data when it ends.

Note: "deleting" has to be real. A soft delete (which only flags the record) is fine for a recycle bin, but at the end of a retention period the data must actually go.

5. Technical basics

ItemWhy
HTTPSWithout it, responses can be read and tampered with in transit
Sanitizing HTML inputPrevents script injection into the admin panel
Rate limitingPrevents bulk extraction and attacks
CSRF protection on mutating methodsPrevents unwanted actions performed with a user's session

6. Tell the respondent

One simple sentence at the top of the form saying what's collected, who sees it and how long it's kept. In many jurisdictions this is a legal requirement, and it also raises the response rate, because it removes ambiguity.

Tags:securityprivacydata