Skip to Content
1
Former Member
Feb 08, 2017 at 06:33 AM

Set cursor/focus on input field SimpleForm

1275 Views Last edit Feb 08, 2017 at 06:34 AM 2 rev

Hi All,

We have a requirement wherein on a page , there is a simple form with 4 input fields. On page load, requirement is to set cursor on first input field. We have an XML view, and in controller, in HandleRouteMatched, have written something like this,

this.getView().byId("<Input Field ID>").focus();

however its not working. Please suggest ways to achieve it.

Thanks and regards,Ruchi Agarwal