Hi @dedik2urniawan, I think this approach might not work as expected since Enketo pulls referenced images on page loading (at least in my testing). An alternative approach could be to do something like this:
If you have four images, blue_pill.png, red_pill.png, blue_ball.png and red_ball.png then you can display them variably with a relevant condition:
survey
| type | name | label | relevant | media::image | calculation |
|---|---|---|---|---|---|
| select_one colours | colour | Colour | |||
| select_one objects | object | Object | |||
| calculate | image_name | concat(${colour}, ‘_’, ${object}) | |||
| note | blue_pill | ${image_name} = ‘blue_pill’ | blue_pill.png | ||
| note | red_pill | ${image_name} = ‘red_pill’ | red_pill.png | ||
| note | blue_ball | ${image_name} = ‘blue_ball’ | blue_ball.png | ||
| note | red_ball | ${image_name} = ‘red_ball’ | red_ball.png |
choices
| list_name | name | label |
|---|---|---|
| colours | blue | Blue |
| colours | red | Red |
| objects | pill | Pill |
| objects | ball | Ball |
