|
| 1 | +# Marking form fields as personal information |
| 2 | + |
| 3 | +Application forms often ask for details that identify the applicant personally — |
| 4 | +a phone number, a home address, a date of birth. Hypha lets you mark those |
| 5 | +questions so that only the people who genuinely need the answers can read them. |
| 6 | + |
| 7 | +Set `PII_FIELD_MARKING_ENABLED=True` to turn the feature on. |
| 8 | + |
| 9 | +## Marking a field |
| 10 | + |
| 11 | +With the setting enabled, the question blocks in the form builder (Wagtail |
| 12 | +Admin → "Apply" → "Forms") gain a **"Personal information"** checkbox. Tick it |
| 13 | +on any question whose answer will contain personally identifiable information. |
| 14 | +A few blocks do not have the checkbox, see |
| 15 | +[Questions without the checkbox](#questions-without-the-checkbox) below. |
| 16 | + |
| 17 | +The checkbox is empty by default, so no existing question changes behaviour when |
| 18 | +you turn the feature on. |
| 19 | + |
| 20 | +## Who can see the answers |
| 21 | + |
| 22 | +Answers to marked questions are shown to: |
| 23 | + |
| 24 | + * the applicant who created the submission |
| 25 | + * the co-applicants invited to that submission |
| 26 | + * staff (and staff admins) |
| 27 | + |
| 28 | +Everyone else — including reviewers, external reviewers and community reviewers |
| 29 | +— sees the question, but the answer is replaced with "Hidden — contains personal |
| 30 | +information." Keeping the question visible means reviewers can still tell what |
| 31 | +was asked and that an answer exists. |
| 32 | + |
| 33 | +Staff also see a small "(PII)" marker after the label of each marked question, |
| 34 | +so they can tell at a glance which answers are restricted. Applicants and |
| 35 | +co-applicants do not see the marker. |
| 36 | + |
| 37 | +## Questions without the checkbox |
| 38 | + |
| 39 | +The built-in required fields (Title, Full name, E-mail, Address, Organization |
| 40 | +name, Requested funding and Duration) do not have the checkbox, because they are |
| 41 | +rendered separately from the rest of the answers and so are never redacted. |
| 42 | +Applicant identity in those fields is controlled separately by |
| 43 | +[`HIDE_IDENTITY_FROM_REVIEWERS`](configuration.md). |
| 44 | + |
| 45 | +The **"Group fields"** block — the question that reveals or hides a group of |
| 46 | +other questions — does not have the checkbox either, so the choice made on it is |
| 47 | +always shown to reviewers. Marking it would achieve little on its own: the |
| 48 | +toggle decides whether the questions inside the group are answered at all, so an |
| 49 | +empty group tells the reader which way it was set. Mark the questions *inside* |
| 50 | +the group instead, which is where the personal information is given. |
| 51 | + |
| 52 | +## Other forms |
| 53 | + |
| 54 | +The checkbox appears on application forms only. Review, determination, project |
| 55 | +(PAF and SOW) and report forms do not have it, since their answers are not |
| 56 | +redacted. |
| 57 | + |
| 58 | +## Turning the feature off again |
| 59 | + |
| 60 | +Setting `PII_FIELD_MARKING_ENABLED=False` hides the checkbox in the form builder |
| 61 | +but does **not** un-hide fields that have already been marked. This is |
| 62 | +deliberate: turning the setting off should never silently expose information |
| 63 | +that was marked as personal. To make an answer visible again, turn the setting |
| 64 | +back on and untick the checkbox on that question. |
| 65 | + |
| 66 | +Note that changing a form only affects submissions made from then on. Each |
| 67 | +submission stores its own copy of the form it was filled in with, so existing |
| 68 | +submissions keep the marks they were submitted with. |
| 69 | + |
| 70 | +For the same reason, a form definition copied or imported from an instance |
| 71 | +where the feature was on arrives with its marks intact, and answers to those |
| 72 | +questions are redacted even though the checkbox is not on offer. Turn the |
| 73 | +setting on if you need to see or change which questions are marked. |
| 74 | + |
| 75 | +## Limitations |
| 76 | + |
| 77 | +Answers are indexed for search regardless of whether they are marked, so a |
| 78 | +search by a reviewer can still match on the text of a hidden answer. The search |
| 79 | +results themselves only show submission titles, never the matched answer. |
| 80 | + |
| 81 | +Redaction applies to the submission page and everywhere the answers are shown on |
| 82 | +it, including the answers panel embedded in the review and determination forms. |
| 83 | + |
| 84 | +Redacting a file or image answer removes the attachment, and with it the |
| 85 | +download link, from the page. It does not revoke access to the file itself: a |
| 86 | +link to it obtained some other way — pasted into a comment, or kept from before |
| 87 | +the question was marked — still works for anyone who can view the submission. |
| 88 | +The link contains the internal id of the question, which is never shown for a |
| 89 | +redacted answer, so it cannot be guessed. |
| 90 | + |
| 91 | +The other places answers appear are restricted to staff already, so nothing is |
| 92 | +redacted there: the submission PDF download, the revision comparison view, and |
| 93 | +CSV exports (the last also governed by `SUBMISSIONS_EXPORT_ACCESS_STAFF` and |
| 94 | +`SUBMISSIONS_EXPORT_ACCESS_STAFF_ADMIN`). |
0 commit comments