Redirect finisher 

This finisher redirects the user after submitting the form to a given page. Additional parameters can be added to the URL.

Options of the redirect finisher 

Page: [pageUid]

Page: [pageUid]
Type
int
Required

true

Default
1

ID of the page to redirect to. Button Page can be used to chose a page from the page tree.

Additional parameters: [additionalParameters]

Additional parameters: [additionalParameters]
Type
string
Default
''

URL parameters which will be appended to the URL.

URL fragment: [fragment]

URL fragment: [fragment]
Type
string
Default
''

ID of a content element identifier or a custom fragment identifier. This will be appended to the URL and used as section anchor.

Adds a fragment (e.g. #c9 or #foo) to the redirect link. The # character can be omitted.

Additional options of the redirect finisher 

These additional options can be set directly in the form definition YAML or programmatically in the options array but not from the backend editor:

delay

delay
Type
int
Default
0

The redirect delay in seconds.

statusCode

statusCode
Type
int
Default
303

The HTTP status code for the redirect. Default is "303 See Other".

Redirect finisher in the YAML form definition 

public/fileadmin/forms/my_form.yaml
identifier: example-form
label: 'example'
type: Form

finishers:
  -
    identifier: Redirect
    options:
      pageUid: 1
      additionalParameters: 'param1=value1&param2=value2'
Copied!

Example: Load the redirect finisher last 

public/fileadmin/forms/my_form_with_multiple_finishers.yaml
identifier: contact
type: Form
prototypeName: standard
finishers:
  -
    identifier: EmailToSender
    options:
      subject: 'Your Message: {message}'
      ## ...
  -
    identifier: DeleteUploads
  -
    # Attention! The Redirect finisher stops the execution of all finishers
    identifier: Redirect
    options:
      pageUid: 1
      additionalParameters: 'param1=value1&param2=value2'
Copied!

Usage of the Redirect finisher in PHP code 

Developers can create a confirmation finisher by using the key Redirect:

<?php

use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Form\Domain\Finishers\ClosureFinisher;
use TYPO3\CMS\Form\Domain\Model\FormDefinition;
class SomeClass
{
    private function addRedirectFinisher(FormDefinition $formDefinition)
    {
        $formDefinition->createFinisher('Redirect', [
            'pageUid' => 1,
            'additionalParameters' => 'param1=value1&param2=value2',
        ]);
    }
}
Copied!

This finisher is implemented in \TYPO3\CMS\Form\Domain\Finishers\RedirectFinisher .