# Setting tab order in a select form field

**URL:** <https://www.ruby-forum.com/t/setting-tab-order-in-a-select-form-field/77918>\
**Category:** Rails\
**Created:** [March 7, 2006, 5:10pm UTC](https://www.ruby-forum.com/t/setting-tab-order-in-a-select-form-field/77918 "2006-03-07T17:10:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![larrywright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc348/32.png) [@larrywright](https://www.ruby-forum.com/u/larrywright)\
**Post date:** [March 7, 2006, 5:10pm UTC](https://www.ruby-forum.com/t/setting-tab-order-in-a-select-form-field/77918/1 "2006-03-07T17:10:00Z")

</div>

Hi  
I’m trying to set the tab order for a select form element. I’m doing it  
like  
so:

\<%= select ‘issue’, ‘person\_name’, people, “tabindex” =\> 6 %\>

but it gets ignored and I get this for output:

Administrator

The same syntax works for input elements so I assumed it would work  
for selects. I must be doing something dumb 🙂

Thanks.

---

<div class="post-metadata">

**Author:** ![larrywright](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/9fc348/32.png) [@larrywright](https://www.ruby-forum.com/u/larrywright)\
**Post date:** [March 7, 2006, 5:55pm UTC](https://www.ruby-forum.com/t/setting-tab-order-in-a-select-form-field/77918/2 "2006-03-07T17:55:39Z")

</div>

I suspect you need some braces in there. Take a look at the api for  
select; it takes two  
hashes… Your example doesn’t seem to distinguish the options hash, so  
select is probably  
interpreting the tabindex as something else and dropping it.

b
