Rub*_*tic 1 ruby-on-rails ruby-on-rails-3 simple-form
How would one set:id =>"myvalue"用于simpleform 集合输入字段?或者在旁注,我也试图设置age_from的ID,如id =>"age_from"无法弄清楚如何做到这两者,似乎非常缺乏这些文档.
尝试了我可以提出的所有可能的组合:
= f.input_field :age_to,
:label => "Age from",
:collection => 18..60,
:select => 19 <------- set this to '19' for this collection?
:style => "width: 50px !important",
:id => "myid" <------- how to set id for this collection?
Run Code Online (Sandbox Code Playgroud)
f.input_field :age_to, :label => "Age from", :collection => 18..60,
:selected => 19, :style => "width: 50px !important", :input_html => { :id => "myid" }
希望它能够设置id并显示所选值!!!
| 归档时间: |
|
| 查看次数: |
2096 次 |
| 最近记录: |