Your front-end script is expecting jQuery to be found as jQuery() object on the front end. Though you are not listing it as a dependecy while enqueuing the front end scripts.
So I found out that if I am not logged in; the redirection doesn’t work because jQuery wasn’t loaded on the front end.
I solved it by enqueuing it in my functions.php with high priority, but if you are planning updates you can just add it as one of the dependencies while enqueing the front end scripts:
public function enqueue_frontend() {
wp_enqueue_script(
'wpcf7-redirect-script',
$this->plugin_url . 'js/wpcf7-redirect-script.js',
array('jquery'),
null,
true
);
Thanks for your work. Really nice plugin, simple, working. Just what I was looking for ??
]]>This plugin injects a JavaScript file wpcf7-redirect-script.js on every page load of the site when installed. The script itself is small, but when this script isn’t required on 99% of the site couldn’t it only be loaded on pages where you actually have a Contact Form 7 on the page to reduce the overhead of a seperate HTTP get for this additional JavaScript when it isn’t needed.
One way to do this might be to have a checkbox in the page editor something like ‘Use Contact Form 7 Redirection’ and only pages that have it selected will pull down the additional JavaScript to do the redirection.
]]>Hello!
I’ve just noticed that Flamingo isn’t storing e-mails after I’ve installed and activated this plugin two months ago. The log stops at the exact time I’ve activated the plugin.
My guess is the redirection is happening before Flamingo can save the e-mail.
In the meantime I’ll try a workaround, but it would be nice if both could work along, they are both really helpful.
Thanks for your time, patience and support!
]]>Just a heads up to the developer. This plugin doesn’t work because it throws an error
$ is not a function
I fixed it changing wpcf7-redirect-script.js by using anonymous functions and (document)
to ($)
and then it works. But it would be nice to have this script fixed for everybody since it’s a very quick fix
I have this plugin with cf7 and wp 5.6 on my web
it sends messages but it does not redirect after sending
Can you help me please or is it necessary to buy plugin?
thanks
]]>Hi,
Is it possible to have different redirect urls mapped to different Submit buttons in the same form? For example..
Redirect to url https://check_values when using [submit id:2 “Check value”]
Redirect to url https://check_interest when using [submit id:3 “Check interest”]