Hi Jonathan,
You could experiment with setting the tabIndex on the input that you want to focus. TabIndex is the setting that manages focus, also on initial page load.
It should also automatically focus the first text box on a page. Perhaps there is an element before that which is taking over? You can use document.activeElement to find out which element currently has the focus.
Hello Jonathan Djuwandi,
There is no default tool in Mendix to allow you to manage focus, you would have to rely on a widget or js/jQuery. Here's a small example with jQuery "$('. my-field'). focus();" you can drop this in an HTML snippet widget as jQuery and it should do the trick. Hope this helps!
Hi Mohamed,
Here is the screenshot. So, my current plan is to try to focus on Username input text field on opening the page (solved by setting the tab index). Then perhaps after inputting the first textfield, I want to move to the password input field automatically with either 2 options:
I just need to know how to set focus to the second one using whats available in Mendix for now.
Best regards,
Jonathan
Hi Jonathan Djuwandi,
Hope this will be helpful please check the same
https://marketplace.mendix.com/link/component/114337