How to disable enter to send message

Hi!

How do I disable that “enter” will not send the message in a form?

Hi Erik,

@callmevlad had some thoughts on that a while ago:

Are you having a specific usability issue come up?

Stu

See jquery - Prevent users from submitting a form by hitting Enter - Stack Overflow

Hi again

Where do I put the following code?

$(document).ready(function() {
  $(window).keydown(function(event){
    if(event.keyCode == 13) {
      event.preventDefault();
      return false;
    }
  });
});

Site Settings > Custom Code > Footer Code

Be sure to wrap JavaScript code within script tags.

1 Like

Thanks! great support as always.

I’m not Webflow staff…

ahaa! Thanks anyway.

This topic was automatically closed after 60 days. New replies are no longer allowed.