Commit 00f46b26 authored by larowlan's avatar larowlan Committed by larowlan

Issue #2584723 by mbovan, larowlan: Add a custom redirect page option to contact forms

parent d1f546e2
......@@ -48,8 +48,8 @@ function contact_storage_contact_message_redirect_submit(&$form, &$form_state) {
/* @var \Drupal\contact\MessageInterface $contact_message */
$contact_message = $form_state->getFormObject()->getEntity();
$contact_form = ContactForm::load($contact_message->bundle());
if ($contact_form->getThirdPartySetting('contact_storage', 'redirect_uri', FALSE)) {
$form_state->setRedirectUrl(Url::fromUri($contact_form->getThirdPartySetting('contact_storage', 'redirect_uri', FALSE)));
if ($redirect_uri = $contact_form->getThirdPartySetting('contact_storage', 'redirect_uri', FALSE)) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment