Hi,
Not sure if it’s the best (or right way) but I was able to do it (at least I think I did) thanks to the help of… ChatGPT.
The answer was not exactly right but it put me in the right track. It seems that GetPaid is already prepared to listen to URL parameters, so, all I had to do was code the Contact Form 7 redirect with the exact URL parameters names, compatible with GetPaid payment form fields.
I had to fire this script in the Contact Form 7 form page.
In this example, the JavaScript code is wrapped in a function that is attached to the wpcf7mailsent
event using the addEventListener
method. When the event is triggered, the function is executed and the user is redirected to the specific page with the URL parameter for the “fname” and “email” fields.
Note that, in the example, the querySelector
method is used to select the “fname” and “email” fields in the form. This method uses a CSS selector to target the field, so we can modify the selector to match the field name or ID that we’re using in the CF7 form, and make it compatible with the GetPaid form fields.
Let me know if I’m doing it wrong.
Thanks!
PS: Sorry for using this thread with something that is not specific to GetPaid but rather Contact Form 7 related. But I guess it may come in handy for someone with similar issues.