Streaming live at 10am (PST)

How to disable enter to send message


#1

Hi!

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


#2

Hi Erik,

@callmevlad had some thoughts on that a while ago:

Are you having a specific usability issue come up?

Stu


#3

See https://stackoverflow.com/q/895171/584192


#4

Hi again

Where do I put the following code?

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

#5

Site Settings > Custom Code > Footer Code

Be sure to wrap JavaScript code within script tags.


#6

Thanks! great support as always.


#7

I’m not Webflow staff…


#8

ahaa! Thanks anyway.


#9

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