- Posts: 348
- Thank you received: 41
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Reading possible choises from cvs file
- Jmantysalo
- Topic Author
- Offline
- Platinum Member
Alice, alice@somewhere.invalid, music
Bob, bob@otherplace.invalid, drugs
Cecilia, cecilia@address.invalid, music
and another list like
music: violin, piano, flute
drugs: heroin, cocaine
Is there an easy way to make LimeSurvey to ask about what advanced course the student will take, and only offer choises available by basic course taken? Of course this is an easy task for basic php page, but could be handy if some other questions could be asked in the same time, and then LimeSurvey is a good tool.
- jelo
- Offline
- Platinum Member
- Posts: 5033
- Thank you received: 1257
Define easyJmantysalo wrote: Is there an easy way to make LimeSurvey to ask about what advanced course the student will take, and only offer choises available by basic course taken?
LimeSurvey supports no dynamic or static lists (which you would use in other survey tools to apply these lists to question types.
Featurerequest: bugs.limesurvey.org/view.php?id=11688
I would suggest using Tokens with attributes. The attributes are variables, where you could save infos about the student and the courses taken. You also define what options each student has in the future to choose from.
manual.limesurvey.org/Survey_participants
I would create a question for each course with the future options "e.g. music: violin, piano, flute" and only display the relevant once for the student, which can be controlled via ExpressionManager accessing the token attributes.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10109
- Thank you received: 3593
I don't understand the need to access the first CSV file - couldn't the basic course be placed in a token attribute?
What question type do you see for the advanced course(s)? I ask because you can't arbitrarily generate answers for LimeSurvey. If using list-radio or multiple-choice questions, the answers/sub-questions must be defined in the LimeSurvey GUI.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- Jmantysalo
- Topic Author
- Offline
- Platinum Member
- Posts: 348
- Thank you received: 41
jelo wrote: Define easy
"Easier than making the form from scratch by plain php."
jelo wrote: I would create a question for each course with the future options "e.g. music: violin, piano, flute" and only display the relevant once for the student, which can be controlled via ExpressionManager accessing the token attributes.
Hmm... Can the token be handled like a string or number? If so, the token could be just of the form XXXYYYY where X-part would define possible choises and YYYY would be string to differentiate students.
- jelo
- Offline
- Platinum Member
- Posts: 5033
- Thank you received: 1257
Did you read about "Survey participants and attributes"? Your question implies that you haven't. If you like to code a workaround to decipher the token into choiceoptions, fine. But you can just place the numbers/codes into a attribute field and access the attribute field inside LimeSurvey.Jmantysalo wrote: Hmm... Can the token be handled like a string or number? If so, the token could be just of the form XXXYYYY where X-part would define possible choises and YYYY would be string to differentiate students.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
- Jmantysalo
- Topic Author
- Offline
- Platinum Member
- Posts: 348
- Thank you received: 41
jelo wrote:
Jmantysalo wrote: Did you read about "Survey participants and attributes"? Your question implies that you haven't. If you like to code a workaround to decipher the token into choiceoptions, fine. But you can just place the numbers/codes into a attribute field and access the attribute field inside LimeSurvey.
Yes, that can be done too. But there is no need if everything needed can be coded as a part of token. I think it could be easier that way.
- Jmantysalo
- Topic Author
- Offline
- Platinum Member
- Posts: 348
- Thank you received: 41
What question type do you see for the advanced course(s)? I ask because you can't arbitrarily generate answers for LimeSurvey. If using list-radio or multiple-choice questions, the answers/sub-questions must be defined in the LimeSurvey GUI.[/quote]tpartner wrote: You can use Evan Plaice's jquery-csv platform to convert CSV contents into JavaScript objects.
Thanks. Seems usefull, I'll look at that.
I don't understand the need to access the first CSV file - couldn't the basic course be placed in a token attribute?
True, it can.
That has not been specified yet. Probably radio button choise or dropdown.
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11658
- Thank you received: 2742
I think it could be easier that way.
I don't think so. What is easier to use the possibilties that LS offers out of the box?
With your approach you would have to have custom coding to break up the token into different bits, while with the approach Jelo highlights you can just create a token table with the necessary custom attributes in columns for each respondent. These custom attributes can be used within the survey, for expressions, relevance equations, etc. and are easily accessible with {TOKEN:ATTRIBUTE_1}
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- DenisChenu
- Away
- LimeSurvey Community Team
- Posts: 13645
- Thank you received: 2491
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.