Change "Enter" button functionality on Create Member popup

The following idea was submitted by Jordan:

Currently, when pressing the "Enter" button on a keyboard while creating a Member, it closes the dialogue. Make the enter button choose the "create" button instead.

This was a major frustration for me in many other places as well. I solved it by simply disabling the enter key on all of MemberMouse's popups.

If you'd like to try this, add the following to your theme or plugin JavaScript:

(function($) {
  $(window).load(function() {

      // Wait for the MemberMouse form container element, then attach events.
      function UIDialogAttachBehaviors () {
        var onMMFormContainer = setInterval(function() {
          if ($('#mm-form-container').length) {
            var UIDialog = $('.ui-dialog');

             * Prevent enter keystrokes from closing popup dialogs.
            UIDialog.find('input, select').keydown(function(e) {
              if (e.which === 13) {
                return false;


        }, 200);


(I did this on the user-facing pages and not the admin, but it should work the same.)

I neglected to give context for the above -- sorry for the confusion.

You'd need to trigger that function upon opening a popup with something like this:


      // Attach to the "Update" button that opens a dialog.



Login or Signup to post a comment