Welcome to the LimeSurvey Community Forum

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

variable IMG based on expression

  • andrewz
  • andrewz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #116835 by andrewz
variable IMG based on expression was created by andrewz
In my survey question I want to do <img alt="" src="/blah/{variable}.png" /> but LimeSurvey is adding a SPAN element.

I filed it as a bug , but maybe it is user error?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 1 month ago #116840 by tpartner
Replied by tpartner on topic variable IMG based on expression
Can you activate a test survey for us to see?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • andrewz
  • andrewz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago - 9 years 1 month ago #116842 by andrewz
Replied by andrewz on topic variable IMG based on expression
OK, here is a live test survey goo.gl/Yw2888 . In my normal survey method 1 does not work in live mode--only in preview, but here method 1 works. The bug ticket mentions methods 2 and 3, and they do not work in either this test survey or my real survey.

And the LSS file goo.gl/FUI9BB
Last edit: 9 years 1 month ago by andrewz.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 1 month ago #116844 by tpartner
Replied by tpartner on topic variable IMG based on expression
Yes, that does seem to be a bug. In the meantime, I think you'll need to use your JavaScript solution which seems to work fine.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • andrewz
  • andrewz's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #116886 by andrewz
Replied by andrewz on topic variable IMG based on expression
Hmm, they closed the bug ticket as WONTFIX.

Meanwhile, the JavaScript does not fire in my real survey except in preview mode, so as a workaround to save time in debugging it, I made 8 questions and am showing one at a time using a relevance equation.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose