Add task to enable form fillers to get a copy of their answers#2778
Merged
Conversation
23126af to
4bbc2d2
Compare
64169a5 to
292f130
Compare
Contributor
Author
|
@StephenGill could you check the content for this please? |
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.
c884fac to
545f47d
Compare
|
🎉 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 For the sign in details and more information, see the review apps wiki page. |
Contributor
|
@stephencdaly I've reviewed the copy in the Review environment - looks good to me |
DavidBiddle
approved these changes
May 18, 2026
Contributor
DavidBiddle
left a comment
There was a problem hiding this comment.
Code looks good, works for me locally, and can see the database field being set as expected 🎉
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this pull request solve?
Trello card: https://trello.com/c/dWxbkDaz
Things to consider when reviewing