如何将提交按钮添加到与表单输入相同的li中?
= semantic_form_for :regression_test_environments do |env|
%ul.input-list
= env.inputs :name, :navigation, :url, :title => "New Environment"
%li.commit= env.submit "Save Environment", :class => "submit"
这只是将li置于字段集之外的类输入。有没有办法将它包含在fieldset(和ul)中?
答案 0 :(得分:0)
这是否有效:
= semantic_form_for :regression_test_environments do |env|
%ul.input-list
= env.inputs :name => "New Environment" do
= env.input :name
= env.input :navigation,
= env.input :url
%li.commit= env.submit "Save Environment", :class => "submit"
我不确定您是否有字段:title
,或者您想要为字段集命名(在这种情况下,您需要使用:name
)。