Skip to content

Copy Answers - #878

Merged
Scullyon merged 5 commits into
mainfrom
feat/DF-1193-configure-copy-answers-from-prior-form-submission
Oct 30, 2026
Merged

Scullyon merged 5 commits into
mainfrom
feat/DF-1193-configure-copy-answers-from-prior-form-submission

Conversation

@Scullyon

Copy link
Copy Markdown
Contributor

Allowing forms to be configured so that a user can copy answers from a prior submission. Requires:

  • User submission e-mails to be enabled
  • Reference numbers to be enabled

Comment thread src/api/forms/repositories/helpers.js Resolved

if (
definition.pages.some(
(page) => page.controller === ControllerType.Summary

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might be better to check for the non-existence of SummaryWithConfirmationEmail rather than looking for Summary - in case we end up adding a different Summary page type

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cheers, shall investigate.

Comment thread src/models/forms.js Outdated
id: idSchema,
optionName: Joi.string()
.valid('showReferenceNumber', 'disableUserFeedback')
.valid('showReferenceNumber', 'disableUserFeedback', 'allowCopy')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I know you're just copying what was already there, but if we get more options, it might be worth putting them into a const so they can be referenced here and also in the above logic so we don;t get typos

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Indeed, that's a good point.

@jbarnsley10 jbarnsley10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Just a couple of minor comments

@sonarqubecloud

Copy link
Copy Markdown

@jbarnsley10 jbarnsley10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great stuff

@Scullyon
Scullyon merged commit b047589 into main Oct 30, 2026
10 checks passed
@Scullyon
Scullyon deleted the feat/DF-1193-configure-copy-answers-from-prior-form-submission branch October 30, 2026 15:09
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.

2 participants