Dynamic images loaded to an image widget from a choice/CSV selection

Another chapter in the increasingly inaccurately named Dynamic images loaded to an image widget thread... (Apologies to Douglas Adams). Perhaps this thread should be renamed 'Dynamic Images in image/select/note widgets' or something...

Dynamic SVGs for a select-one with image-map appearance

It's not currently possible to use an SVG as an image in a question or a note that will let you zoom/pan it like image-map will. big-image also can't be used easily as the default image viewer usually can't handle SVGs, and the SVG viewers that I have tried aren't great (see previous post)

Image column solution (Collect)

However it is possible to create a select-one question that has no valid choices and isn't mandatory nor read only (see another previous post) and use the image-map appearance to render the SVG in a form that can be zoomed and panned for reference.

Extending this, it is possible to dynamically change the displayed SVG using form selections by using a field in the image column for the select-one.

Again, this is like a dynamic image for a note (or a dynamic image against a question that puts the variable in the image column) in the prior post;

  • :white_check_mark: A static SVG eg filename.svg in the image column works in Collect and Enketo.
    • Not actually dynamic, this would require a select for every SVG and relevance to display the correct one.
  • :dragon::white_check_mark: A dynamic SVG filename like ${my_selected_SVG} in the image column works in Collect but in Enketo returns SVG image could not be found.
    • So this is only usable if not creating submissions in Enketo
    • SVG Filenames also must be detailed somewhere else (eg choice list) so that Central will require their upload.