Streaming live at 10am (PST)

[RESOLVED] ENTER key submits forms - is it possible to disable?


#1

Hi,

Is it possible to either disable the 'ENTER' key on forms, or to make it just move to the next line of text?
I've found a few other forum posts asking about that from months ago, without any answers.

thanks,
ecmho


How to disable enter to send message
#2

Hi @ecmho0 - this seems to be standard HTML5 <form> behavior across all browsers, and seems to be a best practice (E.g. http://tjvantoll.com/2013/01/01/enter-should-submit-forms-stop-messing-with-that/). We'd like to understand the problem you're trying to solve, since we're really hesitant to deviate from a cross-browser standard like that.


#3

Thanks for replying.

My concern is that visitors will hit enter to either move to the next field of a form,
or (in a larger text box that is part of a form) hit enter to start a new line,
and in both cases accidently submitting partially filled forms.
Hope that makes sense.


#4

In this case are the next fields required? Or optional?


#5

Okay right so if they're all required this will prevent the first example (pressing enter in order to move to next field),
however if the last field is a 'message' box, that a visitor may write a few sentences in,
hitting enter would still submit the form prematurely.
I guess putting any other field AFTER the message box will solve the issue.

Well that's good enough for me, thanks for helping me figure it out!


#6

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