• Hi,

    I have this use case where users are sending a Contact Form 7 form before getting to the payment form. Is there a way to populate a GetPaid payment form through URL parameters, specifically name and email?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support alexrollin

    (@alexrollin)

    The developers are looking into this and will get back to you with an update.

    Thread Starter Alvaro Gois dos Santos

    (@alvarogois)

    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.

    Plugin Support alexrollin

    (@alexrollin)

    Hello,

    our team agrees with your approach and says that it should work.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is there a way to pass url parameters to a payment form?’ is closed to new replies.