• I learned from the CF7 docs how to do a redirect to an absolute url: on_sent_ok: "location = 'http://example.com/';" but I want to know if there is a way to replace the absolute url with a wordpress variable like home_url() or get_home_url().

    The site is currently on my development server which has a completely different url than it will have on the live server, and I don’t want to have to remember to replace all of the absolute urls in forms once I’m on the live server. I am setting up forms on many landing pages (pages without a navigation bar) so I need to redirect to the home page upon a successful submission.

    Can anyone tell me how to use the site url in a redirect?
    Many thanks.

    https://wordpress.org/plugins/contact-form-7/

  • The topic ‘Redirect to home page on submit using contact form 7’ is closed to new replies.