Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support KokkieH

    (@kokkieh)

    Hi there,

    Not that I know of using that particular function, no. This function is only to redirect to a page on the existing site. It might be possible using this particular hook, though, but we’re not able to help with custom PHP code here.

    A possible workaround is to set up a blank page on your site, use this snippet to redirect the contact form to that page, and then use a redirection plugin or redirect rules in your .htaccess file to automatically redirect that page to the external site you want.

    You can find some different options to setting up off-site redirects here:

    https://www.wpbeginner.com/beginners-guide/beginners-guide-to-creating-redirects-in-wordpress/

    You’ll probably also want to hide the placeholder page you create for this from search engines, lest a redirect on such a page messes with your SEO.

    And to be very clear, this is my own workaround. I’ve tried it on a test site using the Redirection plugin, and it appears to work, but that’s the extent to which we’re able to help with this in this forum.

    Thread Starter backpackingseries

    (@backpackingseries)

    Hi @kokkieh

    Thanks for the quick and helpful response. I am currently using the workaround that you mention (with a 301) to redirect the Thank you page. The method works but the form ID (as #contact-form-id) is appended in the new URL. Could this denote any security issue?

    Kind regards,

    Plugin Contributor James Huff

    (@macmanx)

    No, that’s just an anchor link, not a security concern. ??

    Thread Starter backpackingseries

    (@backpackingseries)

    Cool. Thanks for that confirmation:)

    Kind regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to redirect after form submit to external link?’ is closed to new replies.