Change #form to your form's ID
$('#form input').keydown(function(e) {
if (e.keyCode == 13) {
$('#form').submit();
}
});
Or alternatively
$('input').keydown(function(e) {
if (e.keyCode == 13) {
$(this).closest('form').submit();
}
});