Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Change the type of subquestions in an Array

  • akumasama
  • akumasama's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 2 hours ago #267896 by akumasama
Please help us help you and fill where relevant:
Your LimeSurvey version: 3.15.5+181115
Own server or LimeSurvey hosting: own server
Survey theme/template: question theme Default
==================

I'm pretty confident LimeSurvey CAN do what I'm about to ask, it's more a matter of me being ignorant and not knowing HOW to do it. So I would be very glad if someone could point me out to some resources that can explain all the things I'm missing.
Without further ado, I'm trying to customize an Array (Text) type of question.
I've been of course able to modify the labels of the X-scale and Y-scale, but I've been unable to modify the "type" of each subquestion (column).
I want one to be Text, one to be Numbers, some to be Yes/No etc.
I've been trying to look at the "source" of the main question edit as I assumed it's where you're supposed to decide this sort of stuff, but I couldn't make sense of all that AJAX alas.

Thanks in advance for any form of enlightenment about it

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Online
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 days 13 hours ago #267921 by Joffm
Hi, there are many options, and you only need some javascript.

Use an array(text)

1. To get a column where only numbers are allowed, you may
a. validate.
A question validation like is_empty(Q1_SQ001) or is_numeric(Q1_SQ001)) and (... for all rows
Depending on the numbers to be entered you may use "is_int" or "is_float".
See the "implemented functions"
[url] www.limesurvey.org/manual/ExpressionScri...mplemented_functions [/url]

b. use an input mask (as I show here).
Either this
[url] igorescobar.github.io/jQuery-Mask-Plugin/ [/url]
or
[url] github.com/RobinHerbots/Inputmask [/url]
I used the second

2. To get a column with a Yes/No answer you may
a. insert these vertical radio buttons
b. insert a dropdown with the options.

 
Now decide what you prefer and send the lss export of these relevant questions.

I recommend the drop-down solution, because the other on (the vertical buttons) is designed a bit differently and interferes with other scripts.

Joffm

BTW:
You use a 6 years old version without any bugfix or patch. In times of GDPR you really should consider an update.

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: akumasama

Please Log in to join the conversation.

  • akumasama
  • akumasama's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 days 2 hours ago #267924 by akumasama
Replied by akumasama on topic Change the type of subquestions in an Array
Thanks a lot Joffm! That was very helpful!

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose