我的表单目前有两个字段,下拉列表和一个输入字段。这是我的表单代码:
<div class="offset3 span6">
... # other code not relevant
<div id="topic_questions">
<%= f.simple_fields_for :topic_questions do |tq| %>
<%= tq.link_to_remove "Remove below topic" %> <br><br>
<%= tq.association :topic, collection: @topics, prompt: "Choose a topic", label: false %>
<%= tq.input :number_question, label: 'Number of questions' %>
<% end %>
<p><%= f.link_to_add "Add a topic", :topic_questions %></p>
</div> #topic_questions
</div>
这是表单的样子:
但我希望字段输入有标签Number of questions
将在 dropdownlist 旁边Choose a topic
。我怎样才能做到这一点?