Menu
I am newbie and I have a small problem, I have below jQuery code and I need to add this code with a checkbox above submit button in wpforms with text so once user checks box and press submit button it should redirect to a url in new window without disturbing submission of form and form should be submitted with all details on same page.
If unchecked submission should work normally. Or if it can be achieved by any other code will be highly appreciated as well.
$(‘#button’).click(function(e){
e.preventDefault();
window.open(url,’_blank’);
$(‘form’).submit();
return false;
}
Any help would be highly appreciated.