skill-assessment-app/app/views/candidate/_checkbox.html.erb

18 lines
577 B
Plaintext
Raw Normal View History

2016-07-28 20:54:08 -05:00
<%
question.input_options.each do | option |
option_id = "#{option.parameterize}_#{question.to_i}"
%>
<div class="form-group-multiples">
<input type="checkbox" class="checkbox"
name="input_checkbox_<%= question.to_i %>[]"
id="check_<%= option_id %>"
value="<%= option %>"
<%= "checked=\"checked\"" if Array(question.answer).include?(option) %>
2016-07-28 20:54:08 -05:00
>
<label for="check_<%= option_id %>"><%= option %></label>
</div>
<% end %>
2016-07-27 22:16:12 -05:00
2016-07-28 20:54:08 -05:00
-- MOVE TO FLASH HASH --
<div class="error">Please select or enter an answer.</div>