diff --git a/frontend/src/features/admin-form/settings/components/FormLimitToggle.tsx b/frontend/src/features/admin-form/settings/components/FormLimitToggle.tsx index 33b7fd40d5..539e035ca4 100644 --- a/frontend/src/features/admin-form/settings/components/FormLimitToggle.tsx +++ b/frontend/src/features/admin-form/settings/components/FormLimitToggle.tsx @@ -7,8 +7,11 @@ import { } from 'react' import { FormControl, Skeleton } from '@chakra-ui/react' +import { FormResponseMode } from '~shared/types' + import FormErrorMessage from '~components/FormControl/FormErrorMessage' import FormLabel from '~components/FormControl/FormLabel' +import InlineMessage from '~components/InlineMessage' import NumberInput from '~components/NumberInput' import Toggle from '~components/Toggle' @@ -106,6 +109,8 @@ export const FormLimitToggle = (): JSX.Element => { const { data: settings, isLoading: isLoadingSettings } = useAdminFormSettings() + const isMrf = settings?.responseMode === FormResponseMode.Multirespondent + const { data: responseCount, isLoading: isLoadingCount } = useFormResponsesCount() @@ -149,11 +154,17 @@ export const FormLimitToggle = (): JSX.Element => { return ( handleToggleLimit()} /> + {isMrf ? ( + + Response limits cannot be applied for multi-respondent forms. + + ) : null} {settings && settings?.submissionLimit !== null && (