I want contact form 7 to redirect to a specific page when on_sent_ok is successful.
Unfortunately, the domain of the page to which I want to redirect is not fixed, it changes time to time. But, the rest part of the url remains same.
I have many contact forms. So, if the domain changes, I have to manually change the value of url in all the contact forms. Which is very painful.
So, what I want to do is simple:
I want to create a variable containing the domain name (say, $redirect_domain_name) and store it inside some php file of the plugin.
Then I want to use the variable in the additional settings of Contact From 7 to redirect my users to the correct url.
This way, I don’t have to edit additional settings of all the contact forms manually when the domain changes. I can just change the value of that($redirect_domain_name) variable and all the URLs will automatically be updated.
Can anybody tell me how can I do this?
Thanks in advance :)