Hi,
When using the select() helper, is there any way to specify the DOM id?
This isn't working:
select("", "name", "list", {:id => 'dom_id'})
To be able to use observe_field with this select list, I need to be able to set its id.
Thanks,
Steven
| SitePoint Sponsor |
Hi,
When using the select() helper, is there any way to specify the DOM id?
This isn't working:
select("", "name", "list", {:id => 'dom_id'})
To be able to use observe_field with this select list, I need to be able to set its id.
Thanks,
Steven
Ok, I found the answer.
The 5th parameter of select() is where this needs to be set.
so
output:Code:select("", "platform_id" @platforms, {:prompt=>true}, {:id=>'platform_list'})
HTML Code:<select name="platform_id" id="platform_list"> <option>Please select</option> <option>platform1</option> </select>
Bookmarks