0 votes
ago in Methoden-Fragen by s331358 (110 points)

1) I want persons to choose their favourite activities out of many dropout-options. They should rank them from 1 (their favourite) to 5 . That´s what the multiple dropdown is for.

I do not want that people can choose "swimming" multiple times. If I have chosen it as my favourite, I must not be able to choose ist as the least favourite as well. How can I secure that answers can not be chosen mltiple times?

2) I would like to categorize the possible answers. E.g. some activities belong to "sports". It should not be possible to put more than 2 sport-activities in my ranking. If I try to do so, I should be told that I am not allowed to choose more than 2 activities in the sports-category in my ranking. Is that possible?

1 Answer

0 votes
ago by SoSci Survey (346k points)

ad 1) You may use the multiple dropdowns for that - however, a text input with suggestions may be better for a large number (>20) of options.

Also, a "ranking" question may be better then the multiple dropdowns, depending on how many sports you offer, and how many ranks you offer. This would also prevent people from placing the same sport on two ranks.

I do not want that people can choose "swimming" multiple times

If you prefer the dropdowns, you'll have to do some JavaScript to prevent that. And, of course, you can also use PHP code to check after the click on "next".

However, you may want to allow for errors, so you discover careless cases.

2) I would like to categorize the possible answers.

You'll need a bit PHP code for that. First, make an array with the sports's IDs and the categories, for example:

$cats = [
  1 => 1,
  2 => 1,
  3 => 1,
  4 => 2,
  5 => 2,
  6 => 2
];

Based on that and on getItems() or valueList() (depending on the question type), you can use a loop to count how many sports from which categorie have been chosen. Use repeatPage() to show an error and make the respondent change their answer, if you're not satisfied with the answer.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...