Setting tab order in a select form field


#1

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 :slight_smile:

Thanks.


#2

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