• Resolved Vlad Kotlov

    (@vladkotlov)


    Hello. I’d like to set up a Thank You page so the user is redirected to it after submitting the form. How can I do this?

Viewing 1 replies (of 1 total)
  • Plugin Author onOffice GmbH

    (@onofficeweb)

    Hello Vlad Kotlov,

    thanks for your message.

    You can add a JavaScript redirect in your templates. It could look like this:

    <?php
    if ($pForm->getFormStatus() === onOffice\WPlugin\FormPost::MESSAGE_SUCCESS) {
        ?>
        <script>location.href = "<?php echo home_url('/thanks/');?>"</script>
        <?php
        exit;
    }

    For information on how to individualize the templates, I recommend reading https://wp-plugin.onoffice.com/first-steps/template-customizations/.

    I hope I could help you.

    All the best

    Johannes

Viewing 1 replies (of 1 total)
  • The topic ‘Redirect to the page’ is closed to new replies.