Contact Form 7 -> Paypal. need help with error.
-
I’m trying to do a simple data pass with a donate form using Contact Form 7 plugin data from 1 radio button to the paypal, donation, pay by credit card page. This is the code I’m using in the Contact Form 7 form….
[radio PRICE use_label_element "25" "50" "100" "Other"]?????????????[submit "Continue"]
This is the code I am using on the bottom of the actual donation page…
<script> function my_redirect() { var donate = document.getElementById('PRICE'); if (donate == 'other') { var url = 'https://www.google.com'; window.location = url; } var url = 'https://www.paypal.com/us/cgi-bin/webscr?cmd=_donations&[email protected]&item_name=Donation¤cy_code=USD&amount='+donate+''; window.location = url; } </script>
This is what I get when submitting the form no matter the selection…
ScreenshotIf I just copy/paste the var url into my browers “https://www.paypal.com/us/cgi-bin/webscr?cmd=_donations&[email protected]&item_name=Donation¤cy_code=USD&amount=50” putting any value for the price, it works fine. But through the form it gives that error.
Also the other part is, why is my if statement not actually working? I just want it to forward to another url, but if they select other, nothing happens.
Thanks for any help.
- The topic ‘Contact Form 7 -> Paypal. need help with error.’ is closed to new replies.