# Setting filed with initial focus

**URL:** <https://www.ruby-forum.com/t/setting-filed-with-initial-focus/136390>\
**Category:** Rails\
**Created:** [May 1, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/setting-filed-with-initial-focus/136390 "2008-05-01T16:35:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [May 1, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/setting-filed-with-initial-focus/136390/1 "2008-05-01T16:35:34Z")

</div>

When I display a view for a new action I would like that a particular  
input field already have the focus for the user input. Is there a simple  
option that one can use to accomplish this?

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [May 2, 2008, 6:53am UTC](https://www.ruby-forum.com/t/setting-filed-with-initial-focus/136390/2 "2008-05-02T06:53:10Z")

</div>

[http://www.google.com/search?hl=en&q=setting+text+field+focus&btnG=Search](http://www.google.com/search?hl=en&q=setting+text+field+focus&btnG=Search)
