I was wondering if there is a way to customize the submit button in a way that depending on which radio button is selected after the message sends it will send you to a different redirect.
I was wondering if there is a way to customize the submit button in a way that depending on which radio button is selected after the message sends it will send you to a different redirect.
I tried this, and added it to header.php as well as added an additional parameter to the plugin settings. Unfortunately, it's working fine locally, but not online. Any suggestions?
<script>
function my_redirect() {
var url;
var radioButton = $('input[name=test]:checked', '#radio1').val();
if ( radioButton == 'Facebook' ) {
url = 'http://www.facebook.com';
}
else if ( radioButton == 'Twitter' ) {
url = 'http://www.twitter.com';
}
else {
url = 'http://www.youtube.com';
}
window.location = url;
return false;
}
</script>
Sorry for the triple post, but I was mistaken. It works fine as long as the theme is well structured. I've tested it both online and locally with Twenty Eleven. :)
You must log in to post.