Welcome to the LimeSurvey Community Forum

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

Area type answers with different types

  • mariaserafini
  • mariaserafini's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #159125 by mariaserafini
Area type answers with different types was created by mariaserafini
Hello! I'm new to limesurvey so I ask for your help :-)

I would like to create a question that has a "table" as answer type,for each row I need a text box (e.g. Description of an activity) and number (number of hours dedicated to that activity). Numbers totalized at the end would be great as well!

I imagine I should use the array type but I didn't understand if it possible to use a "mixed" type, i.e. a text and a numeric one.
Other solution would be to use two answers for that question, placing them one next to the other on the page, but is that possible?

Thank you in advance for your help :-)
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago - 6 years 6 months ago #159129 by Joffm
Replied by Joffm on topic Area type answers with different types
Hello, mariaserafini,


first I'd recommend the plugin "arrayTextAdapt".
www.limesurvey.org/index.php?option=com_...textadapt&Itemid=729

The other possibility is to use an array(text) and have a subquestion validation like:

(is_numeric(self.sq_SQ001_2)) and (is_numeric(self.sq_SQ002_2))

meaning: second column of subquestion 1 and subquestion 2 have to be numeric.

For better under standing please read:
manual.limesurvey.org/Expression_Manager


Best regards
Joffm

BTW:
I always see a lot of problems in an approach like this.
That is: How to analyse it?
If you allow people to enter their activities absolutely free, you might get:

1st respondent:
ActivityTime
Swimming2
Watching TV4
Walking3

2nd respondent:
ActivityTime
TV12
Sports1
Shopping5

3rd respondent:
ActivityTime
Read books8
Sleeping11
Swimming6

You see, what I mean:
You have the activity "Swimming" in different colums of the data table.
There is a mention "sports". What is it. Can you add it to swimming? Or summarize "swimming" and others to "sports"?

You will get:
  • Same mention in different columns.
  • Same meaning, different wording.
  • Categories, but also subcategories.
  • ...
So you will have a lot of work to code these mentions and to reorder them, before you are able to do an analysis.
And analysis is more difficult, because each activity has a different base of respondent.
And some will have a very, very small base (only once or twice mentioned).

In these cases it is always better to offer fixed categories (activities).
You know which activities are interesting in this survey.

And of course you are free to ask afterwards something like:
Are there other activities you carried out?

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 6 months ago by Joffm.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #159159 by DenisChenu
Replied by DenisChenu on topic Area type answers with different types

first I'd recommend the plugin "arrayTextAdapt".

Not here i think, the js numeric control system seem broken. I must update and fix but before need some time …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #159160 by tpartner
Replied by tpartner on topic Area type answers with different types

Not here i think, the js numeric control system seem broken...

In the meantime, how about drop-downs for the time inputs?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago - 6 years 6 months ago #159161 by DenisChenu
Replied by DenisChenu on topic Area type answers with different types

tpartner wrote:

Not here i think, the js numeric control system seem broken...

In the meantime, how about drop-downs for the time inputs?

I thinking of usage of bootstrap js date javascript, with "date" / "time" and "datetime" :).

But must
1. Choose a data-XXXX
2. See how to set "format" in data-YYY
3. Create the js function to use this system on the column with this format
4. See if need some event added for expression manager.

:)

PS : but currently : i think more opf a solution to move it to "subquestion edit" or question advanced settings part :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 6 years 6 months ago by DenisChenu.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #159181 by Joffm
Replied by Joffm on topic Area type answers with different types
Hello, Maria,
here something else (a bit different)
Attached sample.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • mariaserafini
  • mariaserafini's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #159197 by mariaserafini
Replied by mariaserafini on topic Area type answers with different types
No problem about this, because it will be a list of possible activities, the description entered by user will be a competition for description: e.g.
Swimming
Tennis
...
And the user will write the day of that activity and number of hours
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago - 6 years 6 months ago #159225 by Joffm
Replied by Joffm on topic Area type answers with different types
Just to add something.
Please, do not crosspost.
You asked the same question at the same time in the Italian section and here.
And you got an answer there.

It's okay to ask in a different section after some days without answer or solution in the first one.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 6 months ago by Joffm.
The topic has been locked.
  • mariaserafini
  • mariaserafini's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #159250 by mariaserafini
Replied by mariaserafini on topic Area type answers with different types
oK, sorry for the mistake!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose