我目前有一份简单的评审表,在承包商在他们的家中工作时会向人们提供1-10级的问题。我使用简单的表格,一切都在使用单选按钮。我想知道是否有人有任何好的资源使单选按钮明星?如果没有,最好的实施方式是什么?这是我目前对表单的代码。
<div class="homeowner-questionnaire">
<%= simple_form_for @contractor_review, url: job_contractor_reviews_path(@job), html: { autocomplete: 'off' } do |f| %>
<%= render partial: "layouts/validation_errors", object: @contractor_review %>
<h4>Please rate the following based on a scale of 1 to 10, 1 being completey dissatisfied, and 1 being completely satisfied:</h4>
<hr>
<%= f.input :professionalism_and_organization, label: "Professionalism and Organization:", as: :radio_buttons, collection: (1..10).each %>
<hr>
<%= f.input :contractor_communication, label: "Contractor Communication:", as: :radio_buttons, collection: (1..10).each %>
<hr>
<%= f.input :problem_resolution, label: "Prolem Resolution:", as: :radio_buttons, collection: (1..10).each %>
<hr>
<%= f.input :convenience_of_scheduling, label: "Convenience of Scheduling:", as: :radio_buttons, collection: (1..10).each %>
<hr>
<%= f.input :construction_quality, label: "Construction Quality:", as: :radio_buttons, collection: (1..10).each %>
<hr>
<%= f.input :daily_jobsite_cleanliness, label: "Daily Jobsite Cleanliness:", as: :radio_buttons, collection: (1..10).each %>
<hr>
<%= f.input :overall_job_cleanup, label: "Overall Job Cleanup:", as: :radio_buttons, collection: (1..10).each %>
<hr>
<%= f.input :overall_installation_experience, label: "Overall Installation Experience:", as: :radio_buttons, collection: (1..10).each %>
<hr>
<%= f.input :overall_value_received, label: "Overall Value Received:", as: :radio_buttons, collection: (1..10).each %>
<hr>
<%= f.input :overall_expectations, label: "Overall Expectations:", as: :radio_buttons, collection: (1..10).each %>
<hr>
<div class="row">
<div class="col-sm-6">
<%= f.input :areas_of_satisfaction, label: "Areas of Satisfaction:" %>
<%= f.input :areas_for_improvement, label: "Areas for Improvement:" %>
<%= f.input :recognized_individual_excellence, label: "Recognized Individual Excellence" %>
<%= f.input :future_remodeling_needs, label: "Future Remodeling Needs:" %>
<%= f.input :additional_comments, label: "Additional Comments:" %>
</div>
</div>
<div class="form-actions">
<%= f.submit "Submit", class: 'btn btn-success' %>
</div>
<% end %>
</div>
重构单选按钮是星星最好的方法还是我朝错误的方向前进?
提前感谢您的帮助,如果您还有其他希望,请与我们联系。