Quantcast
Channel: contact form 7 – WordPress.org Forums
Viewing all articles
Browse latest Browse all 9540

johnja1 on "Contact Form 7 - Additional Settings - conditional redirect + values"

$
0
0

Hey Designreaction,

If you want to pass additional fields values to the URL, then you must get it from the payment provider to map then correctly. I use Paypal as my payment provider and they provide me with the fields I insert them in my url example

on_sent_ok: "if(document.getElementById('paynow') && document.getElementById('chessrating').value> 2200) else if(document.getElementById('paylater')) {location.replace('http://www.greensborochess.org/thank-you-for-your-participation')} else {location = 'https://www.paypal.com/?cmd=_xclick&business=greensborochessclub@gmail.com&currency_code=USD&amount='+jQuery('#Tournamount').val()+'&return=http://www.greensborochess.org/thank-you-for-your-participation/&rm=2&cancel_return=http://www.greensborochess.org/gcc-open-tournament-cancellation/&item_name=GCC Open Tournament&email='+jQuery('#email').val()+'&first_name='+jQuery('#fname').val()+'&last_name='+jQuery('#lname').val()+' ';}"

My "else if" condition is not working, I need to work on it. You can use this as an example to create your own. The rest of the code is fine. Look carefully how I had put all the fields that my form provides. You should discuss this with your payment provided. I use "Jquery" which is supported by Contact Form.


Viewing all articles
Browse latest Browse all 9540

Trending Articles