I have a textarea field that submit the information when the user press the enter key. Below is what I have:
$(document)ready(function(){
$('textarea').on('keypress',function(e){
var txt;
txt = $(this).val();
if(e.which == 13)
{
//submit the form
}
});
});
What I would like to do is submit information when the user presses only the enter key, and do a hard return when the user presses and holds the control key and press enter. (The above code is working fine) I just do not know how to add the other code for the press and hold option. Please explain answer.