Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Dynamically generate options depending on tokens table

Dynamically generate options depending on tokens table 3 years 2 weeks ago #97933

  • Earnest56
  • Earnest56's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Dears,

I want to dynamically generate the options of "Multiple Choice" question depending on the user in the "Tokens" table. I mean when each user open his survey (case of closed survey), different options occur to him.

Is there a way to do this in limesurvey? Anybody did this before and can help me?

Thanks
The administrator has disabled public write access.

Dynamically generate options depending on tokens table 3 years 2 weeks ago #97939

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9293
  • Thank you received: 1325
  • Karma: 384
Hello,

Easy way : Use TOKEN:ATTRIBUTE_1=="condition" in Relevance equation and do X different question.

Denis
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Dynamically generate options depending on tokens table 3 years 2 weeks ago #97979

  • Earnest56
  • Earnest56's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Thanks Denis! Would you please give me more details about this way & perhaps what guide I can use to know how to add attributes & equations..etc. since I'm new to this. :unsure:

Thanks a lot
The administrator has disabled public write access.

Dynamically generate options depending on tokens table 3 years 2 weeks ago #98078

  • Earnest56
  • Earnest56's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Hi Denis,

Is there a way to do "OR" condition instead of "AND"? I mean I want something like:
((TOKEN:ATTRIBUTE_1 == "condition") or (TOKEN:ATTRIBUTE_2 == "condition"))

Thanks a lot
The administrator has disabled public write access.

Dynamically generate options depending on tokens table 3 years 1 week ago #98116

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9293
  • Thank you received: 1325
  • Karma: 384
Hi,
snowhite wrote:
((TOKEN:ATTRIBUTE_1 == "condition") or (TOKEN:ATTRIBUTE_2 == "condition"))
Yes: but you had to delete existing consition and put this directly in input.

See Expression Manager documentation.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Dynamically generate options depending on tokens table 3 years 1 week ago #98140

  • Earnest56
  • Earnest56's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Great! Thank you... Solved :)
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.203 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form