This is might be a little tricky.
I have a form with 10 text boxes(consider its name1, name2 .. name10)
what I want is when I focus on name1
text box and I hit "enter", the form should not submitted. instead I want to call a function.
but when I hit "enter" while focusing other form elements rather than name1
, the form should get submitted.
Please suggest me if you think there are any other idea to do this.
NOTE: I cant move the element outside of the form.