Pierre-Sassoulas / django-survey

A django survey app that can export results as CSV or PDF using your native language.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Questions with multiple short text answers

maximloginov opened this issue · comments

I need to create a survey with question like "How many people of different ages work in your company?" with options to answer like follows (underscores mean text field entry):
18-25 ______
26-35 ______
35-45 ______
46 and older ______
As far as I see, there is no way to create such a question currently (please correct me if I'm wrong). If so I can try to implement such type of question myself (any advise is welcome).

It's possible to create 4 questions each with their own answer (How many people between 18 and 25 yer old work in your company?).

If you want to implement a new style of questions you can take SelectMultiple as an example:
In model it's defined here: https://github.com/Pierre-Sassoulas/django-survey/blob/master/survey/models/question.py#L57
In form it's here: https://github.com/Pierre-Sassoulas/django-survey/blob/master/survey/forms.py#L24
Widget is here: https://github.com/Pierre-Sassoulas/django-survey/blob/master/survey/forms.py#L36

You will probably need to implement a custom Widget for this :)