MarkeyMark
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Is Conditional Redirect Possible?Hi EfremJ,
I was having a similar issue, but trying to to a conditional redirect using a drop-down menu. I eventually got this to work. The link below takes you to the post I added requesting support. I’ve posted the working code on there.
Hope it helps.
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Conditional redirectThe code you need to add into the “Additional Settings” is as follows:
on_sent_ok: ” if (document.getElementById(‘paymenttype’).value==’Invoice’) {location.replace(‘http://www.google.co.uk’)} else { location.replace(‘http://uk.yahoo.com/’) } “
‘paymenttype’ is the ID set on a drop-down menu & ‘Invoice’ is one of the selectable values.
Hope this helps somebody!!
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Conditional redirectOK, I’ve done a little digging & I’ve come up with this code:
on_sent_ok: “if (jQuery(“#payment-type”).value() == “Invoice”) {location.replace(‘http://www.mysite.com/invoice/’);}”
The email submission works, but unfortunately the redirect doesn’t work at all now.
Is it possible do to a conditional redirect with CF7 or do I need to look for an alternative method?
Thanks