As per the Issue, it doesn't work with XLSForm.
I tested choices with columns image
& media::big-image
as well as a note with the same, form doesn't upload. Changing to media::image
& media::big-image
fails in the same manner.
The XLSForm could not be converted: Media type: big-image not supported
I changed it to just big-image
to match the format of image
, and it uploads fine, but form attachments don't then require the files specified in that column, and the images specified in image
do not open a pannable/zoomable image in Enketo and Collect even when the same filename is used in both columns in either notes or selects.
If this did work, how would selecting an image as the choice be differentiated from selecting the image to embiggen?
edit: It only works if you edit the XML version
Success after downloading the XML definition and editing:
I downloaded the definition, added the big-image element after the regular image element for a choice and a note, eg:
<value form="image">jr://images/cat_small.jpg</value><value form="big-image">jr://images/cat_large.jpg</value>
For both select_one
and a note
:
In Collect, selecting the image then gives the system dialogue 'Open with?' to let you pan/zoom in selected app, and back arrow to return to the question. (So you can't select the choice by tapping the image anymore, which means the appearance no-buttons
will break (tested: selecting the images acts as a choice in Collect, no large image. no-buttons
doesn't work in Enketo so clicking the small image does open large as popover and select by the label as usual.)
In Enketo, selecting the image FILLS the current browser with the large image popped over the form (scroll bar exists but does nothing), aspect is distorted to fit the frame. Can be zoomed and panned, selecting again closes it. Edit: if the browser is wider it distorts to fill the frame instead of padding white space on the side(s), if the browser is taller, it doesn't and pads with whitespace underneath
I would be happy with the current Collect functionality for now if I didn't have to edit the XML manually, as that's just not practical. The Enketo stretch display is annoying, but is only used by my team for reviewing submissions anyway.
Edit 2:
This is less than ideal, but does work:
- Create form, but put large images under another media type column that's unused, eg
video
oraudio
- Upload form, download XML and edit
- Do a find/replace as
"video">jr://video
-->"big-image">jr://images
- If you are using the same images for image and big-image you will need to change the filename slightly in XLSform to avoid duplicates, eg replace
jpg
withxyz
(valid file extensions aren't checked on XLSForm upload), then you will also need to find/replace this in XML as you will get aA resource already exists with formDefId,name value(s) of ...
error at XLSForm upload. - upload modified XML and then upload the missing large images to Form Attachments
eg
<value form="image">jr://images/cat_small.jpg</value><value form="video">jr://video/cat_big.xyz</value>
would become
<value form="image">jr://images/cat_small.jpg</value><value form="big-image">jr://images/cat_big.jpg</value>