Make username field active when entering the admin login page

OpenCart already uses jquery so all you need to is to pass focus() function to input username to make it focus on the username field. Here is how to do it. Open the following file in your favorite php editor:
/admin/view/template/common/login.tpl

and copy/paste this code:

Code:

$(document).ready(function() {
$(“input[name=username]”).focus();
});

Leave a Comment