Editor : edit form ENTER act like a TAB

Editor : edit form ENTER act like a TAB

lifedaniellifedaniel Posts: 68Questions: 4Answers: 0

Hello, I would like to know if it is possible to let the ENTER key act like a TAB in a form (edit) so when an User press tab the focus goes to the next input and not submit the form.

Thank you very much

Replies

  • allanallan Posts: 63,262Questions: 1Answers: 10,424 Site admin

    That sounds like two different things? To have tab not submit the data, just disable the submitOnBlur. To have enter jump to the next field, you would need to modify whatever key event handlers you are currently using to detect that key press, submit and then progress on to the next field for editing.

    Allan

  • lifedaniellifedaniel Posts: 68Questions: 4Answers: 0

    Well not really, If I change the ENTER key to act like a TAB key, It will no more submit the form, but just change the focus over the inputs.

    But I don't really know how to Do it with EDITOR :-/

  • allanallan Posts: 63,262Questions: 1Answers: 10,424 Site admin

    What I would suggest doing it attaching an event listener to postEdit to trigger a jump to the next field. The return key will still submit the form as normal, but the event handler will move on to the next field when he edit is done.

    Allan

  • lifedaniellifedaniel Posts: 68Questions: 4Answers: 0

    Do you have any example on how to use it?

  • allanallan Posts: 63,262Questions: 1Answers: 10,424 Site admin

    Not at the moment. I'm fairly tied up at the moment, so it might be a little while before I can produce such an example.

    Allan

This discussion has been closed.