Welcome, Guest
Username: Password: Remember me

TOPIC: Numbers only for Multiple Choice with Comments

Numbers only for Multiple Choice with Comments 2 years 11 months 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.

Re: Numbers only for Multiple Choice with Comments 2 years 11 months ago #68441

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4272
  • Thank you received: 806
  • Karma: 369
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 2 years 11 months ago by tpartner.
The administrator has disabled public write access.

Re: Numbers only for Multiple Choice with Comments 2 years 11 months ago #68452

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.

Re: Numbers only for Multiple Choice with Comments 2 years 11 months 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.

Re: Numbers only for Multiple Choice with Comments 2 years 11 months ago #68548

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5331
  • Thank you received: 296
  • Karma: 249
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)limesurvey.org'"
The administrator has disabled public write access.

Re: Numbers only for Multiple Choice with Comments 2 years 11 months ago #68563

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4272
  • Thank you received: 806
  • Karma: 369
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Numbers only for Multiple Choice with Comments 2 years 10 months 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.

Re: Numbers only for Multiple Choice with Comments 2 years 10 months ago #69718

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4272
  • Thank you received: 806
  • Karma: 369
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_survey_96314.lss
File Size: 43 KB
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.117 seconds
Donation Image