Welcome to the LimeSurvey Community Forum

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

Possible to let users add answer field?

More
9 years 5 months ago - 9 years 5 months ago #133289 by keunes
For my master's thesis I'm thinking of a rather complex survey design. I want to study the thoughts and opinions of people on a set of occasions in which they consumed news, which they also need to describe themselves.

My question is: is it possible to let users add fields in a Multiple short text question? I could of course set the amount of rows, but that either limits the respondent (if I create for example 5 rows) or is too big/looks too intimidating (if I create 15 rows)

Example:
1. select subjects you read/saw/heard news about: [Multiple choice]
1a [user input = ✓ treaty between the EU and Ukraine]
1a.1 where and when did you get news about it? [Multiple short text]
1a.1a [user input = in the morning train to work]
1a.1b [user input = on facebook when laying in bed before sleeping]
1a.1x "Add additional occasion"-button
1a.2 which medium did you use to get news about this subject? [Multiple short text]
1a.2a [user input = Metro]
1a.2b [user input = CNN]
1a.2x "Add additional medium"-button
1b [user input = ✓ US presidential elections]
1b.1 where and when did you read about it? [Multiple short text]
1a.1a [user input = on the evening news]
Etc...
Last edit: 9 years 5 months ago by keunes.
The topic has been locked.
More
9 years 5 months ago #133290 by coeneisma
Yes, but you have to define the answer options on forehand. Then you can hide them using Expression Manager on sub-question-level untill something is typed in the previous text field.

Example with 10 input fields: www.surveyonderzoek.nl/onderzoek/index.php/798391?newtest=Y#

lss-file as attachement
The topic has been locked.
More
9 years 5 months ago #133428 by holch
Hi Coeneisma,

I downloaded your .lss file and imported it to test. But somehow nothing happens. I found the relevance equations, but somehow they don't do anything. Seems like in the latest version, the experessions are not read via Javascript, so your input doesn't have any impact on what you are doing. What version of LS are you running? I tested it on my localhost with the latest version 160317

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
9 years 5 months ago #133431 by coeneisma
It runs on 2.06+ Build 160129, so that might be the problem.. :dry:
The topic has been locked.
More
9 years 5 months ago #133436 by holch
Hahaha, the problem is not that your's runs on 2.06. The problem is that mine runs on 2.5. Unfortunately still quite a few things that need fixing I guess...

Thanks for your answer. I already reported a bug.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
9 years 5 months ago #133438 by coeneisma
Haha, ok, thanks. Was allready testing it on my local system and also just noticed it didn't work in the 2.5 version. Thanks for bug report.
The topic has been locked.
More
9 years 5 months ago #133439 by holch
Here the link to the bug report. Feel free to add any observations:
bugs.limesurvey.org/view.php?id=10816

Actually, I reported it in another "bug". Should create a separate one, because this one is a lot more important than the GUI one.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
9 years 5 months ago #133440 by holch
Here the actual bug report just for this issue:
bugs.limesurvey.org/view.php?id=10818

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
9 years 4 months ago #134937 by keunes
Dear Coen,

Thanks for replying so quickly :) I've only now started to actually transfer the questionnaire from LO Writer to LimeSurvey and don't really understand what I need to do to get "Expression Manager on sub-question-level".

I tried importing your lss file into my university's system, but that results in an error so I can't check what exactly you did. What I suspect, based on your comment & the xml file:
- use a 'multiple short text' question type
- add [maximum amount I want] of subquestions
- somehow add [tt]!is_empty(inputfields_n)[/tt] per subquestion. But where can I set this? Based on www.limesurvey.org/manual/Expression_Manager_HowTos I think I should add it as [tt]array_filter[/tt], but I can't think of a way that makes the subquestion name (inputfields_n) generic (so that it changes n).

Thanks again for your help! (And sorry if my questions don't make a lot of sense)
The topic has been locked.
More
9 years 4 months ago #134944 by coeneisma
Hi Keunes,

Your assumptions are correct. See screenshots in attachement:

1. screenshot of logic file
2 & 3 show where the subquestion relevance can be found (on my work computer, so couldn't draw a nice red arrow to point to the buttion :p)

This in done in LS 2.06+ Build 160129. You should check the version your university uses, it could be a old version that doesn't have this feature.

Coen
The following user(s) said Thank You: keunes
The topic has been locked.
More
9 years 4 months ago #134945 by keunes
Oh crap. Seems like that nice button without the red arrow is not present in my university's installation :(
They have "Version 2.00+ Build 130802". I'll see if they can update, and otherwise install LimeSurvey myself.

Thanks again anyway for the quick reply!!
The topic has been locked.
More
9 years 4 months ago #135044 by first
Something similar here

Survey Designer and Programmer
The topic has been locked.
More
9 years 4 months ago #135052 by keunes
So in the end I installed my own version of LimeSurvey at my hosting. Simply works B)
The topic has been locked.
More
9 years 4 months ago - 9 years 4 months ago #135087 by keunes
Ok, next challenge with this issue: I succeeded for one question, but when I copy that question (and I'll do that a lot as I'll need the same question many times) the relevance equation for each sub-question remains the same. So
- Q1_SQ2 has [tt]!is_empty(Q1_SQ1)[/tt]
- after copying, Q2_SQ2 still has [tt]!is_empty(Q1_SQ1)[/tt] which breaks the idea, meaning that for Q2 and all subsequent questions I need to edit the relevance equation of all sub-questions... which takes a lot of time.

Is it somehow possible to do sth like [tt]!is_empty(this_SQ1)[/tt] or [tt]!is_empty(this.sq_X-1)[/tt]? (as you can see, I don't understand how the this,that and self things work). Then I don't need to do all the adjustments for each copied question.
Last edit: 9 years 4 months ago by keunes. Reason: clarify
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose