Redirect different forms to different urls
-
I used to use the old on_sent_ok: method, but it no longer works. I see (on https://contactform7.com/redirecting-to-another-url-after-submissions/) that they recommend using this code instead:
<script>
document.addEventListener( ‘wpcf7mailsent’, function( event ) {
location = ‘https://example.com/’;
}, false );
</script>This is working properly, but here’s my issue: I assume this will send ALL CF7 forms to the url I put in here as location, but I have two forms and I’d like them to redirect to different pages. Is there another line of code or something to do this; then perhaps I can have this same code twice, one for each form, each with its own redirect url.
Thanks for any help! Ted
The page I need help with: [log in to see the link]
- The topic ‘Redirect different forms to different urls’ is closed to new replies.