Since the Sulu core team is not sure yet about the best way to implement landing pages for forms we've created a simple workaround.
Install using composer:
composer require innomedio/sulu-form-landing-page-bundle
Add the bundle to config/bundles.php
if it's not automatically added:
Innomedio\Sulu\FormLandingPageBundle\InnomedioSuluFormLandingPageBundle::class => ['all' => true],
You can now define the redirect url for successfully submitted forms. You can also define a querystring that needs to be appended.
{{ form_start(content.testForm) }}
<input type="hidden" name="_sulu_form_redirect" value="{{ sulu_content_load(content.landingPage).path }}" />
<input type="hidden" name="_sulu_form_querystring" value="?utm=this&id=that" />
{{ form_end(content.testForm) }}
So now you could create a content block containing a single_page_selection and single_form_selection field to be able to dynamically handle form redirects.
There's also a helper template available:
{% include '@InnomedioSuluFormLandingPage/sulu_redirect_form.html.twig' with {
form: content.testForm,
redirect: sulu_content_load(content.landingPage).path,
querystring: '?utm=this&id=that'
} %}