Welcome to the LimeSurvey Community Forum

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

Dynamic Images based on Assessment

  • g3guy
  • g3guy's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 11 months ago #94182 by g3guy
Dynamic Images based on Assessment was created by g3guy
Hi

I've been working on utilising a combo of the Expression Manager and the Assessment page for a results page.

Thanks to TMSWhite's suggestion, I customised the Assessment template over here

The next thing is to improve on the look and rather than having a score, I would have a traffic light effect (so 1-2 = Red, 3 = Amber, 4-5 = Green for instance).

I've been Googling around, but have not hit on the right key words clearly - can you please point me in the right direction?

Thanks!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 11 months ago #94184 by tpartner
Replied by tpartner on topic Dynamic Images based on Assessment
If you are using the solution in the linked post, it seems to me that it is simply a matter of replacing the text in the conditional text-display questions with images.


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
  • g3guy
  • g3guy's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
10 years 11 months ago #94191 by g3guy
Replied by g3guy on topic Dynamic Images based on Assessment
Thanks! Although my example didn't quite follow on from the link (I should have been more detailed in my posting) it did stir on the right thinking.

I ended up with something like this in my coding (assessment template)
Code:
<tr>
  <td class="assessment-module">1. Authentic Consulting</td>
  <td class="assessment-row">
    {if((sum(x_1_0,x_2_0,x_3_0,x_4_0,x_5_0))/5 <= 2.5,'<img src="{TEMPLATEURL}1.png"/>',
    if((sum(x_1_0,x_2_0,x_3_0,x_4_0,x_5_0))/5 <= 3.5,'<img src="{TEMPLATEURL}2.png"/>',
    '<img src="{TEMPLATEURL}3.png"/>'))}
  </td>
  <td class="assessment-row">
    {if((sum(x_1_1,x_2_1,x_3_1,x_4_1,x_5_1))/5 <= 2.5,'<img src="{TEMPLATEURL}1.png"/>',
    if((sum(x_1_1,x_2_1,x_3_1,x_4_1,x_5_1))/5 <= 3.5,'<img src="{TEMPLATEURL}2.png"/>',
    '<img src="{TEMPLATEURL}3.png"/>'))}
  </td>
</tr>

Thanks again! :)
The following user(s) said Thank You: h1ghland3r
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 11 months ago #94193 by tpartner
Replied by tpartner on topic Dynamic Images based on Assessment
Nice solution. Thanks for providing the example for other users.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: g3guy
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose