Skip to content

Commit 691ce29

Browse files
authored
Merge pull request #239 from alphagov/hannahkc-json-documentation
JSON design and content documentation
2 parents 9e780c8 + f8ef591 commit 691ce29

5 files changed

Lines changed: 154 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Completed form submissions
2+
3+
## Contents
4+
5+
- [What](#what)
6+
- [Iterations](#iterations)
7+
___
8+
9+
## What
10+
11+
How completed forms are sent to the form owners for processing, and how form creators set this up in the platform.
12+
13+
## Iterations
14+
15+
### Email submissions
16+
17+
The initial MVP of the form builder provided email as the only way to receive completed form submissions.
18+
19+
The form creator has to provide an email address for them to be sent to. That email address must be verified with a code before it can receive submissions. This must be done before a form can be made live.
20+
21+
When a form is completed, the answers given are sent to the email address in the body of an email. There is one email for each form completed.
22+
23+
Email was the starting point for the product as it is equivalent to the way many document-based forms are delivered to government services.
24+
25+
### CSV file email attachment
26+
27+
This iteration added the option for form creators to also get the answers in a CSV file attached to each completed form email. The task list to create or edit a form was given an extra optional task to 'Get completed forms as CSV files' for form creators to turn the CSVs on or off.
28+
29+
### [JSON file email attachment, December 2024](version-3-json-submissions.md)
30+
31+
This added the option for form creators to get form submissions in a JSON file attached to each completed form email.
32+
33+
### S3 buckets, late 2024
34+
35+
We offered teams the option to set up AWS S3 buckets to receive completed form submissions. Initially this was offered as a manual process outside of the platform.
36+
The form owners would have to set up the bucket and manage it themselves. They would also have to choose to receive completed forms as either JSON or CSV files. Once we set it up, they would then get completed forms sent to their S3 bucket instead of via email.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This folder is for screenshots of version 3 of getting completed form submissions: JSON file submissions.
Loading
Loading
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# JSON file submissions
2+
3+
- Date released: December 2025
4+
- [Epic Trello card](https://trello.com/c/Ou6R5hE4/146-alternative-submission-types-json)
5+
___
6+
7+
## Contents
8+
9+
- [What is this iteration](#what-is-this-iteration)
10+
- [Design and content](#design-and-content)
11+
12+
___
13+
14+
## What is this iteration?
15+
16+
This added the option for form owners to get the answers from each completed form in a JSON file attached to each completed form email.
17+
18+
### As-is
19+
20+
Form creators get answers from each completed form sent to them in the body of an email. They can also opt to get the answers in a CSV file that is attached to each email.
21+
22+
### To-be
23+
24+
People can also opt to receive data from each completed form in a JSON file attached to the completed form email.
25+
26+
### Why?
27+
28+
We believe providing a JSON file as another way to get form submissions would be a useful iteration for people who use automated processing on the completed form emails.
29+
30+
## Design and content
31+
The designs and content changed for this iteration were:
32+
33+
- the addition of a second option to the existing optional task to ‘Get a CSV of each completed form’, plus related error and success banner messages
34+
- a new JSON schema and format for each JSON file to use
35+
- additional lines of content for the completed form email and the live form details page if JSON submissions are turned on
36+
37+
### Task list page
38+
39+
<img alt="section of the task list page that is described and explained in the body content" src="version-3-json-submissions-screenshots/set-up-how-you-get-completed-forms-tasks.png" width="500">
40+
41+
**Description of the image and changes:**
42+
43+
The screenshot above shows the second section of the task list for creating a form. It has the heading: “2. Set up how you get completed forms”.
44+
45+
Under the heading there are two tasks. The link text for the first is “Set the email address completed forms will be sent to” and for the second is “Enter the email address confirmation code”. In the example here they each show a status on the right of “completed”.
46+
47+
Beneath that, there is another task with a subheading, “Optional task”. There is one task listed under this subheading. The link text for this task is “Get a CSV or JSON file of each completed form”. The status of this task is ‘Optional’.
48+
49+
Before this iteration, the link text for this task was “Get completed forms as CSV files”.
50+
51+
If the form creator goes into this task and turns either CSV or JSON files on. The status of the task will change to ‘Completed’. If both options are unselected, it will be marked as ‘Optional’.
52+
53+
### ‘Get a CSV or JSON file of each completed form’ page
54+
55+
<img alt="Get a CSV or JSON file of each completed form page that is described and explained in the body content" src="version-3-json-submissions-screenshots/get-a-csv-or-json-file-of-each-completed-form.png" width="500">
56+
57+
**Description of the image and changes:**
58+
59+
The screenshot above shows the new content on the page for the task. The H1 is: ‘Get a CSV or JSON file of each completed form’. Above the h1, a grey caption shows the name of the form being created.
60+
61+
The content below the heading is:
62+
63+
> When your form’s completed, the answers provided will be sent in the body of an email to the email address you set.
64+
>
65+
> You can also get the answers in:
66+
>
67+
> - A CSV file - this lists all the answers in plain text, separated by commas. It can be easily imported into a spreadsheet or database application.
68+
> - a JSON file - this is a plain text format for exchanging and storing data. It can make it easier to use automated processing for your form submissions.
69+
>
70+
> If you select one or both of these options, the files will be attached to each completed form email.
71+
72+
There is then a h2 question that reads:
73+
74+
> Do you want to get a CSV or JSON file of each completed form?
75+
76+
Followed by two checkbox options:
77+
78+
> - Get a CSV file of each completed form
79+
> - Get a JSON file of each completed form
80+
81+
And then a green ‘Save and continue’ button.
82+
83+
People can select one, both or neither option.
84+
85+
### Success notification banners
86+
87+
If a form creator changes the options selected on the ‘Get a CSV or JSON file of each completed form’ page, they are returned to the task list and a green success banner notification is shown at the top of the page.
88+
89+
The messages that can be shown:
90+
91+
| What the form creator selects or unselects | Banner to show | Task status to set |
92+
|------------------------------------------------|-----------------------------------------------------------|--------------------|
93+
| Doesn't change anything | No banner | Unchanged |
94+
| Selects or unselects something and CSV is set | Completed form emails will include a CSV file | Completed |
95+
| Selects or unselects something and JSON is set | Completed form emails will include a JSON file | Completed |
96+
| Selects something and CSV and JSON are set | Completed form emails will include a CSV and a JSON file | Completed |
97+
| Unselects something and nothing is set | Completed form emails will not include a CSV or JSON file | Optional |
98+
99+
100+
### Live form details page
101+
Once a form is live, the live form’s details page shows all information, content and settings for the form. With this iteration we’ve edited the section that listed if completed form emails would include a CSV attachment of the answers.
102+
103+
This section’s heading is now “CSV and JSON”.
104+
105+
Beneath that, the relevant line out of these 4 is shown:
106+
107+
- Each completed form is also attached to the email as a CSV file. You have not opted to get each completed form as a JSON file.
108+
- Each completed form is also attached to the email as a CSV file and a JSON file.
109+
- Each completed form is also attached to the email as a JSON file. You have not opted to get each completed form as a CSV file.
110+
- You have not opted to also get each completed form as a JSON or CSV file.
111+
112+
### Completed form email
113+
If JSON attachments are turned on, there is a new additional line in the completed form email to tell the recipient that there is a JSON file attached, and its filename. For example:
114+
115+
> A JSON file of these answers is attached to this email in a file named: govuk_forms_name_of_the_form_AR2DR5WF.json
116+
117+

0 commit comments

Comments
 (0)