diff --git a/src/components/Form.js b/src/components/Form.js index d43c0056d..462db1a2b 100644 --- a/src/components/Form.js +++ b/src/components/Form.js @@ -359,7 +359,11 @@ const Form = () => { element={} /> - } /> + } + /> { submission={state.submission} onFormStart={onFormStart} onDestroySession={onDestroySession} + initialDataReference={initialDataReference} /> } diff --git a/src/components/FormStart/index.js b/src/components/FormStart/index.js index ae0fc9679..70acd9940 100644 --- a/src/components/FormStart/index.js +++ b/src/components/FormStart/index.js @@ -41,7 +41,7 @@ const FormStartMessage = ({form}) => { * This is shown when the form is initially loaded and provides the explicit user * action to start the form, or present the login button (DigiD, eHerkenning...) */ -const FormStart = ({form, submission, onFormStart, onDestroySession}) => { +const FormStart = ({form, submission, onFormStart, onDestroySession, initialDataReference}) => { const hasActiveSubmission = !!submission; const isAuthenticated = hasActiveSubmission && submission.isAuthenticated; const doStart = useStartSubmission(); @@ -121,7 +121,11 @@ const FormStart = ({form, submission, onFormStart, onDestroySession}) => { isAuthenticated={isAuthenticated} /> ) : ( - + )} diff --git a/src/components/IntroductionPage/index.js b/src/components/IntroductionPage/index.js index af64e0694..0b6cb6ee0 100644 --- a/src/components/IntroductionPage/index.js +++ b/src/components/IntroductionPage/index.js @@ -9,11 +9,13 @@ import Card from 'components/Card'; import FAIcon from 'components/FAIcon'; import Link from 'components/Link'; -const IntroductionPage = () => { +const IntroductionPage = ({extraParams = {}}) => { const {name, introductionPageContent = ''} = useContext(FormContext); if (!introductionPageContent) { return ; } + let startUrl = '/startpagina'; + if (extraParams) startUrl = `${startUrl}?${new URLSearchParams(extraParams).toString()}`; return ( { /> { +const LoginOptions = ({form, onFormStart, extraParams = {}}) => { const config = useContext(ConfigContext); const loginAsYourselfOptions = []; @@ -18,7 +18,7 @@ const LoginOptions = ({form, onFormStart}) => { form.loginOptions.forEach(option => { let readyOption = {...option}; - readyOption.url = getLoginUrl(option); + readyOption.url = getLoginUrl(option, extraParams); readyOption.label = ( { LoginOptions.propTypes = { form: Types.Form.isRequired, onFormStart: PropTypes.func.isRequired, + extraParams: PropTypes.object, }; export default LoginOptions;