Dear team
In a survey, there are 50 medical equipment and its uses on the roster format. I want to show the image of each item in the capi question. How to set the image for each occurrence.
Thank you.
Regards
Brti
Show image on roster
-
aaronw
- Posts: 571
- Joined: June 9th, 2016, 9:38 am
- Location: Washington, DC
Re: Show image on roster
Each field's CAPI question text includes the ability to add conditions. You could add a condition for each of the 50 occurrences like this:
Then select each condition and add the image for that occurrence.
You do not have the required permissions to view the files attached to this post.
-
Gregory Martin
- Posts: 1947
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Show image on roster
Another option, if you are comfortable editing the question text HTML, is to call a function that gives you the name of the image. That may be easier to maintain than keeping track of 50 separate occurrences of question text. The HTML may be something like:
And then this, as an example, alternates between providing two images:
Code: Select all
<p><img src="~~GetImageFilename()~~"></p>function string GetImageFilename()
if systime() % 2 = 0 then
exit "image1.jpg";
else
exit "image2.jpg";
endif;
end;
if systime() % 2 = 0 then
exit "image1.jpg";
else
exit "image2.jpg";
endif;
end;