I have a form at Contact Forms 7 to get my clients to receive a call in 30 minutes.
A guy built us a API that does the job. But I need to add the phone number automatically to the end of the external URL (not my contact page nor the thank you page). When submitted, the form redirects to a ‘thank you page’ and should fire a javascript that sets the phone number at the end of the URL.
Im new to Javascript but I’ve tried this code by prieston, but i don’t really know what I’m doing. Can anyone help?
I’ve also tried the CF7 to Webhook but it didnt work.
3
Answers
We managed to make it work with Javascript/AJAX with the following code.
The code was fired with the plug-in Redirection for Contact Form 7 by Qube One.
The redirection to a 'thank you page' was made with the same plugin.
You can use Contact Form 7 events.
So something like this will fire when the form is submitted.
Try this javascript:
That would create a hidden iframe which will load the url. Then it should still be able to redirect the user to the thank-you page afterward.