Skip to content

Commit

Permalink
fix(mrf): remove any response limits for MRF (#7214)
Browse files Browse the repository at this point in the history
* fix: set submission limit to null for MRF

* chore: improve explanation comments on reasons for removing submission limit
  • Loading branch information
kathleenkhy authored Mar 28, 2024
1 parent b0331b0 commit b1a7790
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/modules/form/admin-form/admin-form.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,13 @@ export const duplicateForm = (
overrideProps.endPage = omit(originalForm.endPage, 'buttonLink')
}

// if MRF, set submissionLimit = null
// this is because MRF does not support submission limit (i.e. response limit)

if (overrideProps.responseMode === FormResponseMode.Multirespondent) {
overrideProps.submissionLimit = null
}

const duplicateParams = originalForm.getDuplicateParams(overrideProps)

if (workspaceId)
Expand Down
1 change: 1 addition & 0 deletions src/app/modules/form/admin-form/admin-form.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export type OverrideProps = {
responseMode: FormResponseMode
emails?: string | string[]
publicKey?: string
submissionLimit?: number | null
}

export type EditFormFieldResult = Result<FormFieldSchema[], EditFieldError>

0 comments on commit b1a7790

Please sign in to comment.