EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Ariovaldo on April 08, 2023, 05:10:38 AM



Title: [SOLVED] Put the focus() on the first field of the form
Post by: Ariovaldo on April 08, 2023, 05:10:38 AM
Hello,

I would like to know if there is any way to put the focus in the first available field of the form, less input hidden and less input disable.

I know how to do field by field (input by input), but I have many pages it would have to be by javascript or CSS ???


Ari


Title: Re: Put the focus() on the first field of the form
Post by: jarry on April 11, 2023, 01:32:06 AM
Please try this code to get the first field of the form.
Code:
var f = $('#ff').find('.validatebox-text:not(:disabled):first');
f.focus();


Title: Re: Put the focus() on the first field of the form
Post by: Ariovaldo on April 11, 2023, 03:25:35 AM
thank you very much
 ;D