Implemented Form.js Disabler - Add option to NOT autofocus

Snog

Well-known member
I know this might seem strange, but I have an application where the autofocus for the fields being revealed shouldn't happen. So, I'm wondering if an option could be added to the disabler?

Options in js: autofocus: true // if false, autofocus won't happen

js code:
Code:
if (this.options.autofocus)
{
    var cb = function () {
        XF.layoutChange();
        select();
    };
}
else
{
    var cb = function () {
        XF.layoutChange();
    };
}
I think that's correct and I have tested it to work. But you might want to double check it. ;)

Template option: data-autofocus="false";

Thanks!
 
Upvote 1
This suggestion has been implemented. Votes are no longer accepted.
Top Bottom