【发布时间】:2015-03-18 16:59:08
【问题描述】:
我在 Active Admin 中有这个表格:
form(:html => { :multipart => true }) do |f|
f.inputs 'Home Carousel Image' do
f.input :name
f.input :file, as: :file
f.input :headline_text, as: :html_editor
f.input :button_text
f.input :featured_image?
f.input :headline_text
f.input :button_text
end
actions
end
精选图片?是一个布尔值。我希望看看用户是否选择了这个(将其切换为 true),然后才会显示 :headline_text 和 :button_text 的输入字段。否则,这两个字段将在表单中隐藏。
这可能吗?
谢谢
【问题讨论】:
标签: ruby-on-rails forms activeadmin