Hi, I'm having a problem that preventing automatic save when enter key pressed in the text field.
the code I'm looking in as follows.
function CheckEnterKey() {
if (event.which == 13) {
event.preventDefault();
var s = $('.nextstepdetails').val();
$('.nextstepdetails').val(s + "");
$('.nextstepdetails').focus();
}
}
// Edit template functions for MultiLine textbox
function createML() {
return "<textarea class='form-control nextstepdetails' rows='1' cols='50' style='word-wrap:break-word !important;' onkeydown='CheckEnterKey()' onkeypress='CheckEnterKey()'>{{:NextStepDetail}}</textarea>";
}
the text field is styled as textarea. I don't want autosave when 'Enter' key pressed. I want to keep editing the text and just click 'Save/Update' button to save.
Thank you in advance!
Kind Regards,