Skip to main content
Topic: set focus on a field (Read 1476 times) previous topic - next topic

set focus on a field

Hi there,

How can i set a focus on a specific txt field on page load (add page) ?

Thanks
Eroll

Re: set focus on a field

Reply #1
@Eroll‍ use the following code below👇 and place it in the ClientEvents of the field.
Code: [Select]
$( document ).ready(function() {
    $("#ctrl-progress").focus();
});

Please replace  "progress" with the name of the field you want to focus on.
Note: that ctrl-progress is the id of my field name called progress.


Re: set focus on a field

Reply #2
Thanks Willvin,
Working great

Was using  $("#ctrl-progress").focus(); but without  the $( document ).ready(function()  ;-)

Have a nice day.
Eroll