Trigger a button click using Enter key

Hello UI Bakery team,

I had a requirement in my project and it is to allow the submission of a form by hitting the ‘Enter’ key.

The form can be submitted by clicking on e.g. the Login button and executing the action but it is not possible to just enter the username and password and hit Enter key in order to login.

I am not sure if that feature is present UI Bakery or not. Could you please tell me how to do it?

Thanks so much!

1 Like

hi @isfand!
I’ve been investigating for the idea on how to achieve this without code, but, it seems to me the only way to achieve this feature at the moment - is to use a Custom Code step where you need to define “Enter key” and listen when the enter key is clicked.
I hope this helps :slightly_smiling_face:

1 Like

Hi @ArtemRomanovsky,

Thanks for responding.

That way doesn’t feel right :sweat_smile:
Couldn’t we add the username and password fields to a “form” like in HTML so that when we press Enter key, the form is submitted. Shouldn’t it be approached like this?

I agree with you @isfand, but for the moment, the only possible way is to use a Code step.

1 Like

Okay, @ArtemRomanovsky . Thanks so much!