question builder
This commit is contained in:
parent
4356616566
commit
3105c8da5d
28 changed files with 338 additions and 15 deletions
13
app/views/conference_registration/_questions.html.haml
Normal file
13
app/views/conference_registration/_questions.html.haml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
- @conference.questions.each do |q|
|
||||
%h5
|
||||
= "Q: #{q.title}"
|
||||
- if q.question_type.id == 1 || q.question_type.id == 2 # yes/no or single choice
|
||||
= f.input :qanswers, :collection => q.qanswers, :as => :select, :input_html => { :multiple => false }, :label => false, :include_blank => "Please make your choice",
|
||||
:member_label => Proc.new {|a| a.answer.title}
|
||||
|
||||
- if q.question_type.id == 3 # multiple choice
|
||||
= f.input :qanswers, :collection => q.qanswers, :as => :check_boxes, :label => false,
|
||||
:member_label => Proc.new {|a| a.answer.title}
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue