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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Larry W. (Guest)
on 2006-03-07 18:10
(Received via mailing list)
I'm trying to set the tab order for a select form element. I'm doing it

<%= 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

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

Ben M. (Guest)
on 2006-03-07 18: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.

This topic is locked and can not be replied to.