Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions with multiple short text answers #132

Open
maximloginov opened this issue Apr 1, 2021 · 1 comment
Open

Questions with multiple short text answers #132

maximloginov opened this issue Apr 1, 2021 · 1 comment
Labels
enhancement This is a feature not a bug good-first-issue This issue is doable without a deep understanding of the project hacktoberfest

Comments

@maximloginov
Copy link

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).

@Pierre-Sassoulas
Copy link
Owner

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 :)

@Pierre-Sassoulas Pierre-Sassoulas added enhancement This is a feature not a bug good-first-issue This issue is doable without a deep understanding of the project labels Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is a feature not a bug good-first-issue This issue is doable without a deep understanding of the project hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants