Hello B, I need to implement this function but I have an individual contact form on over 20 pages, is this the right thing to do? ( also, the CF7 success redirects plugin seems to no longer work? )
Hello Bjorn, thanks for the tip. I added your code to my function.php file and redirect is working good. However the tiny loading gif that appears nex to the Submit button and is no more being displayed as well as the the feedback message at the bottom. Do you think it can be related to the snippet injection?
Hi Bjorn
Thanks for the code. This is exactly what we wanted. I have installed the code in my themes function.php file, However, the redirection happened only once. Now the form still shows the old message and does not get redirected. I have tried clearing the cache.
Let me know if there is an alternate solution to this problem.
Your videos are great and I am now following you.
I’m an novice at coding and I’ve only been working with the WordPress CMS for a few years.
I can find plugins to allow what I need to accomplish, but I should not have to purchase one for this simple function. Plus if what happens again that happened recently regarding plugins not working due to upgrades, I’d rather not purchase. I am close using multiple code sources, but to no avail.
What I would like to do is use similar code as above, but grab a calculated sum on a single form and then send this to PayPal to process payment.
Please advise.
Hi Bjorn, when I try to insert the following code:
add_action( ‘wp_footer’, ‘cf7_thank_you_redirect’ );
function cf7_thank_you_redirect() {
?>
<?php
}
I get the following error message:
"Your PHP code changes were rolled back due to an error on line 743 of file wp-content/themes/TheFox/functions.php. Please fix and try saving again.
syntax error, unexpected '}'"
What is going wrong here?
Whoops:
add_action( ‘wp_footer’, ‘cf7_thank_you_redirect’ );
function cf7_thank_you_redirect() {
?>
<?php
}
Well, it’s not showing, but I basically replaced the number values and the thank you page URLs. Is there anything else I need to do or is it just not compatible with my theme?
Nevermind, I figured it out. There was a small “?>” that I had to put the code inside of. I’m not a coder but I figured it out! Sorry for spamming you!
Help me?
I have a custom template… only a index page, any codes works for me..
what i have to do?
I’m using the last version of wordpress en CF7
Hi Bjorn,
How can I redirect single form to multiple url’s based upon the drop down selection or radio buttons?
Hello Sir,
it worked very well but i want to open url in new tab.
hello sir, why we choose “wp_footer” as a hook to execute it…please can u tell reason behind it…
Hi Bjorn,
I have added in the code to the bottom of my functions PHP file, replace the ID and URL with the correct one, but all i get when the form is submitted is a continual processing wheel. it never rejects the form or redirects? Any ideas, am i supposed to be replacing a part of the code rather than just adding in your code?
Hi Bjorn
I am learning a lot good things from your videos. Thanks for that.
Can i change the function (‘wpcf7mailsent’), say for example
I have created drop down list and it contains 2 items.
So if anyone selects
Item 1 it should redirect to Page 1
(OR)
if anyone selects Item 2 it should redirect to Page 2
is there any solution for this if yes then please help.
Thanks in advance
Love you
Hi Bjorn,
I tried both the codes as per your you tube instructions, but its not working for me. Can you please tell me what would be the reasons.
Hi Bjorn,
I am using “arforms ” and creating a form which includes only dropdowns. This form has dropdowns of state, city, district and villages.
My first question is can I redirect one submit button to different pages? For example, if I select a state: Telangana, District: Hyderabad, Village: Ameerpet. So when I click submit it should go to the page Ameerpet and again when I change village as Banjara hills it should go to the page bunjara hills.
2nd question: Is it possible with the code that you have given here?
3rd question: Will this work for “arform”?
If you have a solution for this, then please let me know.
Thank you
Hi Bjorn,
Do I have to create a child theme for this like I did in a previous tutorial? (https://www.youtube.com/watch?v=cIipjZASZ140)
Thanks so much!
Suzy