Streaming live at 10am (PST)

Disable send form by hitting enter



I've noticed that when I switch form setting to "post" it automatically enables sending the form by hitting enter on the keyboard, which I don't like. I've tried including this bit of JS

$('myform').submit(function() {
  return false;

I've changed 'myform' to my form ID but unfortunately no luck.

Can anyone suggest how to disable this?


Here is my public share link: LINK
(how to access public share link)


My JavaScript knowledge isn't very good I'm afraid but could it be possible that the script is loading before the DOM is ready and available to it?

Best wishes,



This is not a valid selector


@samliew Unfortunately I am not a JS pro as well :open_mouth: maybe you can elaborate more? thx


Delete your existing script.

Paste this in page settings > footer code

$('#email-form').submit(function() {
  return false;


Whoohoo, you rock @samliew

so simple. but I wouldn't ever have a clue :slight_smile:


Actually I've just realised it is a bad solution :frowning:
I didn't notice at first but it actually prevents the form sending even by mouse clicking on the send button. I'm using this code instead now, It works but I'd love to be able to create new paragraphs within text area by hitting enter, I only want to avoid sending the form by enter. Anyone please?

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



Replace with this

$(function() {
   $('.w-button').attr('type', 'button').click(function() {


Nope, that doesn't allow me to make a new paragraph within the message area...


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