Skip to content

Commit

Permalink
force focus on the first input of forms
Browse files Browse the repository at this point in the history
  • Loading branch information
kakwa committed Jul 6, 2016
1 parent ce09b60 commit 655ccab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/templates/form.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,9 @@ if (fields['${attrid}'] != null) {
};
% endfor
</script>
<script>
$(document).ready(function() {
$('form:eq(1) *:input[type!=hidden]:first').focus();
});
</script>
% endif

0 comments on commit 655ccab

Please sign in to comment.