Area type answers with different types

More
1 month 3 weeks ago #159125 by mariaserafini
mariaserafini created the topic: Area type answers with different types
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 :-)

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #159129 by Joffm
Joffm replied the topic: Area type answers with different types
Hello, mariaserafini,


first I'd recommend the plugin "arrayTextAdapt".
https://www.limesurvey.org/index.php?option=com_sobipro&pid=76&sid=98:arraytextadapt&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:
https://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?
Last Edit: 1 month 3 weeks ago by Joffm.

Please Log in to join the conversation.

More
1 month 3 weeks ago #159159 by DenisChenu
DenisChenu replied the 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
1 month 3 weeks ago #159160 by tpartner
tpartner replied the 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.

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #159161 by DenisChenu
DenisChenu replied the 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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 1 month 3 weeks ago by DenisChenu.

Please Log in to join the conversation.

More
1 month 2 weeks ago #159181 by Joffm
Joffm replied the topic: Area type answers with different types
Hello, Maria,
here something else (a bit different)
Attached sample.

Best regards
Joffm
Attachments:

Please Log in to join the conversation.

More
1 month 2 weeks ago #159197 by mariaserafini
mariaserafini replied the 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

Please Log in to join the conversation.

More
1 month 2 weeks ago - 1 month 2 weeks ago #159225 by Joffm
Joffm replied the 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
Last Edit: 1 month 2 weeks ago by Joffm.

Please Log in to join the conversation.

More
1 month 2 weeks ago #159250 by mariaserafini
mariaserafini replied the topic: Area type answers with different types
oK, sorry for the mistake!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!