嗨,在我的rails应用程序中,我使用simple_form
gem作为联系表单,同一联系表单在两个控制器中呈现。在一个控制器中,它运行良好,在另一个控制器中,未显示表单域。在通过firebug检查时,这是输出
<form class="contact_form" novalidate="novalidate" method="post" action="/controller/contactform" accept-charset="UTF-8">
<div style="margin:0;padding:0;display:inline">
<div class="input string required contact_form_name" style="display: none;">
<label class="string required" for="contact_form_name" style="display: none;">
<input id="contact_form_name" class="string required" type="text" size="50" placeholder="Name" name="contact_form[name]" style="display: none;">
</div>
<div class="input email required contact_form_email" style="display: none;">
<div class="input string required contact_form_title" style="display: none;">
<div class="input text required contact_form_message" style="display: none;">
<input class="btn btn-larger btn-danger" type="submit" value="Submit" name="commit">
</form>
它说display: none
,我也改变了 simple_form.rb 文件中的类名,但它不起作用......该怎么办?