0
使用I產生5 UserPrices
所以用戶填寫所有相同表單字段的5嵌套形式的日期:方法,使date_select字段是對所有其他date_select領域
UserPricesController
def add_store_prices
@a_new_user = User.new
5.times do
@a_new_user.user_prices.build
end
end
我有一個字段名爲:PURCHASE_DATE這是一個date_select(日期下拉菜單)字段:
<%= f.date_select :purchase_date %>
我想只使用一個UserPrice date_select作爲其他4個UserPrices的日期,這樣用戶不必選擇5日期下拉菜單,只能選擇一個,是否有一個jQuery插件或JavaScript代碼來做到這一點可能?
P.S .:這是它現在的樣子,我想擺脫其他4日期行,只有一個。
遺憾是很難理解 – david
你知道有關的Ruby-on-Rails的? – LearningRoR
那麼這個問題是針對Ruby on Rails的,但我會爲它編寫一般的jQuery或JavaScript。 – LearningRoR