Skip to content

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

Open
stephencdaly wants to merge 7 commits into
mainfrom
add-page-to-enable-copy-of-answers
Open

Add task to enable form fillers to get a copy of their answers#2778
stephencdaly wants to merge 7 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 2 times, most recently from 66e39cd to 64169a5 Compare May 14, 2026 16:56
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.
@stephencdaly stephencdaly force-pushed the add-page-to-enable-copy-of-answers branch from 64169a5 to 292f130 Compare May 14, 2026 17:02
@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.

@stephencdaly stephencdaly marked this pull request as ready for review May 15, 2026 11:20
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.

1 participant