action-center-platform icon indicating copy to clipboard operation
action-center-platform copied to clipboard

On institution signatures filter, hitting enter after selecting should submit the form

Open vbrown608 opened this issue 9 years ago • 1 comments

Maybe like this (from https://github.com/select2/select2/issues/1456)

  $('.select2-selection').on('keypress', function (e) {
    if (e.keyCode === 13) {
      $(this).closest('form').submit();
    }
  });

vbrown608 avatar Oct 20 '16 22:10 vbrown608

$('your select element').on('select2:close', function () { if ($(form).validate()) { $('.select2-selection').one('keydown', function (e) { if (e.keyCode === 13) $(form).submit(); }); } }).on('select2:open', function () { $('.select2-selection').off('keydown'); });

dev-javascript avatar May 17 '19 17:05 dev-javascript