Image in an app form

Hello folks

I am seeking to upload am image below a particular label in an app form , i have created the form configuration with its text element

          <text id="someimage">
            <value form="image">jr://cliff.jpeg</value>
          </text>

And the input element below the label in the form

<input ref="q2">
    <label ref="jr:itext('somevideo')"/>
</input>

On uploading with cht-conf the image is not appearing in the form as expected .
Any thoughts on why the image could be missing in the form ?

The first thing that jumps out at me here is that your reference in your input is ‚Äúsomevideo‚ÄĚ, but your id in the text element is ‚Äúsomeimage‚ÄĚ. I think these need to match.

Out of curiosity, are you using a xlsx file to create your form or are you manually editing the xml? I notice that the documentation does not really describe how to include media via the xlsxform format which is unfortunate. (I have logged an issue to correct that.)

In the meantime, the CHWordle form has a really simple example of including an image as part of a note. Basically, you put your image in ./forms/app/*form-name*-media/images (note the extra images directory) and then you can reference it in your xlsx file by entering the name of the image file in the media::image column.

1 Like

sure ,thanks

am using xlsx file tho since there was no doc for it i decided to use xml for the image bit

thanks ,let me look into this

1 Like