I am troubling with a small issue, which is a form submission by hitting the "Enter" key. Actually, it is working fine when I have one text field. But my issue how can I submit the form when I have all types of fields (Input text, Text area, drop down, radio button, check box, etc). I need to submit form when I hit the "Enter" key at a particular field.
How can I make a form submission by hitting the "Enter" key when the focus is on a particular item.?
Asked
Active
Viewed 84 times
0
-
2Please provide some example code. What have you attempted? – misterManSam Mar 11 '14 at 13:49
2 Answers
0
Maybe this can help, you basically make the enter key submit a form not depending on the current focused field: Submit form with Enter key without submit button?

Community
- 1
- 1

Sirius Clarke
- 29
- 3
0
HTML forms submit automatically when you hit the enter key if
- The element with focus is a single-ling text field
AND
- The field is the only field in the form; OR
- The form has at least one button or an input with type=submit
In your case, you may include a button <button type="submit">Submit</button>
, and you can hide it using CSS if you don't want it showing.

Kizer
- 1,548
- 2
- 14
- 24