Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Numbers only for Multiple Choice with Comments

Numbers only for Multiple Choice with Comments 5 years 1 month ago #68438

  • asonimie
  • asonimie's Avatar
Is it possible to only allow numbers for the comment field on Multiple Choice with Comments question type?

Beyond that, would it be possible to limit what numbers could be used? e.g., can only use one of each of the following: 1, 2, 3.

Or maybe limit the number of comments, or a max sum.

The main hurdle is allowing only numbers for the comment field. The other questions would be helpful.
The administrator has disabled public write access.

Numbers only for Multiple Choice with Comments 5 years 1 month ago #68441

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
There are a couple of workarounds to apply masks to text inputs - docs.limesurvey.org/tiki-index.php?page=...vey#Text_input_masks

You can use JavaScript to control the number of allowed inputs or their maximum sum. The details of the script would depend on your specific needs.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 5 years 1 month ago by tpartner.
The administrator has disabled public write access.

Numbers only for Multiple Choice with Comments 5 years 1 month ago #68452

  • fransmarcelissen
  • fransmarcelissen's Avatar
  • Offline
  • Gold Lime
  • Posts: 241
  • Thank you received: 53
  • Karma: 13
I would use two questions, where the second is only displayed if the first has a certain value. The second can be an dropdown with only numbers.
Frans
The administrator has disabled public write access.

Numbers only for Multiple Choice with Comments 5 years 1 month ago #68536

  • asonimie
  • asonimie's Avatar
The scenario that we come across quite often is this:

From a list of words (Multiple choice, select your ideal words.

Then from the list of words that you just selected, rank with 1, 2, 3, which is most important (1), to least important (3).

I've been doing a filter so the second question is a multiple choice with comment, but I'm not able to control them entering a 1, 2, or 3 only in the boxes. And once 1 is entered in a box, it can't be used in the others.

Another option might be to filter the multiple choice selections for a follow up ranking question, if that's more straightforward than the 1, 2, 3 route.
The administrator has disabled public write access.

Numbers only for Multiple Choice with Comments 5 years 1 month ago #68548

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6029
  • Thank you received: 373
  • Karma: 260
asonimie wrote:
Another option might be to filter the multiple choice selections for a follow up ranking question, if that's more straightforward than the 1, 2, 3 route.
That's definitely the better choice. Have a look at the "array filter" attribute: docs.limesurvey.org/Advanced+question+se...eSurvey#array_filter

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The administrator has disabled public write access.

Numbers only for Multiple Choice with Comments 5 years 1 month ago #68563

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
Here is a workaround to filter a ranking question with the results of a previous multiple-options question - docs.limesurvey.org/tiki-index.php?page_...ith_Multiple-Options
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

Numbers only for Multiple Choice with Comments 5 years 2 weeks ago #69707

  • helperE
  • helperE's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 1
  • Karma: 0
can you export the questions in the survey of your example/Demo?

i am a newbie and have updated the template.js but yet my Demo survey for filtering a rank based upon choices selected is not working at all.

thanks
The administrator has disabled public write access.

Numbers only for Multiple Choice with Comments 5 years 2 weeks ago #69718

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6574
  • Thank you received: 1477
  • Karma: 579
Here's an export of the Demo survey. You will need to modify the question IDs in the scripts after importing.

File Attachment:

File Name: limesurvey...6314.lss
File Size:43 KB
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.
Time to create page: 0.664 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form