Forum: Ruby on Rails setting tab order in a select form field

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D4b246038154d7cc2363256bd25a4fe0?d=identicon&s=25 Larry White (Guest)
on 2006-03-07 17:10
(Received via mailing list)
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:

<select id="issue_person_name" name="issue[person_name]"><option
value="1">Administrator</option>

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

Thanks.
4005a47a8f2ceee49670b920593c1d52?d=identicon&s=25 Ben Munat (Guest)
on 2006-03-07 17:55
(Received via mailing list)
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
This topic is locked and can not be replied to.