REMINDER
Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.
TIP: Trigger button click on enter
-
I would like to trigger the login button when a user clicks on the enter key in a password field.
I found the following code on w3schools:
var input = document.getElementById("passwordField"); // Execute a function when the user releases a key on the keyboard input.addEventListener("keyup", function(event) { // Number 13 is the "Enter" key on the keyboard if (event.keyCode === 13) { // Cancel the default action, if needed event.preventDefault(); // Trigger the button element with a click document.getElementById("loginButton").click(); } });
Don't forget to specify the id's for the password field and login button, in this case 'passwordField' and 'loginButton'
click button when user clicks enter key in input field(s) ... or something similar -
link to w3shools 'How TO' page ... https://www.w3schools.com/howto/howto_js_trigger_button_enter.asp
-
Hi again,
I'm not sure, is it a feature request for Cloud Backend Inputs?
-
@Wassim perhaps it's an idea, but that's up to you and the number of users this might be useful to ...