Skip to content

Add task to enable form fillers to get a copy of their answers#2778

Merged
stephencdaly merged 8 commits into
mainfrom
add-page-to-enable-copy-of-answers
May 18, 2026
Merged

Add task to enable form fillers to get a copy of their answers#2778
stephencdaly merged 8 commits into
mainfrom
add-page-to-enable-copy-of-answers

Conversation

@stephencdaly
Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

Trello card: https://trello.com/c/dWxbkDaz

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

@stephencdaly stephencdaly changed the base branch from main to copy-of-answers May 14, 2026 14:56
Base automatically changed from copy-of-answers to main May 14, 2026 14:56
@stephencdaly stephencdaly force-pushed the add-page-to-enable-copy-of-answers branch from 23126af to 4bbc2d2 Compare May 14, 2026 15:13
@stephencdaly stephencdaly changed the title Add form creators to enable the option for form fillers to get a copy of their answers Allow form creators to enable the option for form fillers to get a copy of their answers May 14, 2026
@stephencdaly stephencdaly changed the title Allow form creators to enable the option for form fillers to get a copy of their answers Add task to enable form fillers to get a copy of their answers May 14, 2026
@stephencdaly stephencdaly force-pushed the add-page-to-enable-copy-of-answers branch 3 times, most recently from 64169a5 to 292f130 Compare May 14, 2026 17:02
@stephencdaly stephencdaly marked this pull request as ready for review May 15, 2026 11:20
@stephencdaly
Copy link
Copy Markdown
Contributor Author

@StephenGill could you check the content for this please?

@stephencdaly stephencdaly requested a review from StephenGill May 18, 2026 10:16
Add a template and input object for enabling form fillers to select to
receive a copy of their answers.

This page has a checkbox with a checked value of "enabled" and an
unchecked value of "disabled". We use the value to directly set the
value of `send_copy_of_answers` on the form.

Add validation that the value is an allowed value to prevent saving
invalid user input should someone tamper with the request. Use a
generic error message that we use in other places for unexpected
invalid input.
Add controller and routes for the page to enable the option for
form fillers to get a copy of their answers.
form.disabled?/form.enabled? methods provided by the enum are a bit
confusing. Add a prefix to make these clearer.
The status will be "Completed" when it is enabled and "Optional" when
it is disabled.
This task is optional and appears in the same sub-section as the
payment link task. The subsection heading is now "Optional tasks"
rather than "Optional task" as there are now two tasks under it.
Only show the task in the task list if the send_filler_answers feature
flag is enabled. Also return a 404 if the user tries to access the
copy of answers page when the feature flag is disabled.
If send_copy_of_answers is enabled for the live form, show a section
on the live form page.

We don't need to check the feature flag because we don't display
anything if send_copy_of_answers is disabled.
If the feature flag is enabled, tell users that answers will be
included in the confirmaiton email if they have enabled it and the
user opts to receive them.
@stephencdaly stephencdaly force-pushed the add-page-to-enable-copy-of-answers branch from c884fac to 545f47d Compare May 18, 2026 14:10
@github-actions
Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2778.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@StephenGill
Copy link
Copy Markdown
Contributor

@stephencdaly I've reviewed the copy in the Review environment - looks good to me

Copy link
Copy Markdown
Contributor

@DavidBiddle DavidBiddle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, works for me locally, and can see the database field being set as expected 🎉

@stephencdaly stephencdaly added this pull request to the merge queue May 18, 2026
Merged via the queue into main with commit 23f44c7 May 18, 2026
3 checks passed
@stephencdaly stephencdaly deleted the add-page-to-enable-copy-of-answers branch May 18, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants