= simple_form_for @item, :controller => "items", :action => "new", do |f|
= render 'shared/messages', :object => @item
fieldset
legend Create Item
h5 What are you listing?
a.dress dress
a.bottoms bottoms
a.tops tops
span#dresses style="display:none;"
# if dress is clicked, then the f.select values different values.
# example values would be "green, white"
span#bottoms style="display:none;"
# if bottom is clicked, then the f.select values different values.
# example values would be "pink, orange"
span#tops style="display:none;"
# if tops is clicked, then the f.select values different values.
# example values would be "aqua, blank"
f.select :color, "select values based on clicked above"
我的最终目标是,当我单击“dress”时,jquery 将更新值属性,用于选择:color,因为每个都会不同。上面单击的每个链接都会为 :color 选择字段流行一组不同的选择值。
很难找到一种优雅的方式来处理这个问题。
谢谢