app/views/helena/questions/_checkbox_group.html.slim
fieldset.checkbox_group class="#{'helena-error' if errors[question.code]}"
legend= question_label(question, dummy: true)
= form.simple_fields_for :answers do |answer_form|
- question.sub_questions.each do |sub_question|
.checkbox
label
- checked = (answers[sub_question.code].to_s == sub_question.value.to_s) if sub_question.value
- checked ||= sub_question.preselected
= answer_form.input_field sub_question.code, as: :boolean,
value: sub_question.value,
checked: checked
= sub_question.text
- if errors[question.code]
.error= errors[question.code]