Focus Fu

Auto-focusing on the first field of a form has thankfully become standard practice. A quick bit of javascript and it’s done.

Add :focus => true to the end of a supported Rails helper. Examples

<%= text_field :user, :name, :focus => true %> <%= text_field_tag :user_name, nil, :focus => true %> <%= select :post, :category, %w(rails python), :focus => true %>

Tags

You need to Login to tag this item.