[Plugin: Contact Form 7] Conditional redirect

I’m using the on_sent_ok action in ‘Additional Settings’ to redirect to a payment page.

I would like to use a conditional redirect that directs the user different pages depending on whether a checkbox/radio button has been selected.

I’ve looked at the post by ckpicker who appears to be asking a similar question, however the code that has been used in his post displays an alert on the screen rather than redirecting to alternative pages.

Thanks for the code. I’m still having a problem with the conditional redirect; both options linked to the 2nd URL.
Radio Button choices: Paypal, Bank Transfer

I put this code in the additional settings, but it always leads to Google page instead of Paypal.
on_sent_ok: ” if (document.getElementById(‘paymentmode’).value==’Paypal’) {location.replace(‘http://www.paypal.com’)} else { location.replace(‘http://www.google.com’) } “

Any fix? 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Contact Form 7] Conditional redirect’ is closed to new replies.