I have a form that should change action href based on checkbox. One action is contact.html and the other is link to external page responsible for subscribtions (freshmail). For example http://ift.tt/1jBnDYz. If I change action to http://ift.tt/1jBnDYz the form doesn't send messages to my email, but only goes to http://ift.tt/1jBnDYz How can I change it to send emails always, but enroll to freshmail only when checkbox is checked?
$('#site.contact #left :checkbox').change(function() {
if($(this).is(":checked")) {
console.log('checked');
$('.jsForm').attr('action', 'http://ift.tt/1vf9p7i');
} else {
$('.jsForm').attr('action', 'kontakt.html');
console.log('unchecked');
}
Code above changes action perfectly, but what next?
Aucun commentaire:
Enregistrer un commentaire