Image as a select option

Hi Friends,

I am trying to add images as options for select one/multiple questions. I
know, I can display an image next to the check box or radio button;
however, I do not want the radio buttons, instead, I would like the images
to work as a select option. I found some examples on ODK website, which is
for XML, but how do I program that on xls form?

Thanks,
Imran

Hi Imran,

You can use a select_one with an appearance of compact. If you want to
force n columns, use compact-n. Then in your choices sheet, add an
image column with the name of the image file (e.g., red.png). Those
media files need to be uploaded with the form or put in
/sdcard/odk/formName-media/.

I've attached an example form (grid.xls) with a few images
({red,orange,blue}.png) and a screenshot (screenshot.png).

If you want to find out more, see http://xlsform.org/#appearance and
http://xlsform.org/ref-table.

Yaw

grid.xlsx (10.3 KB)

image

image

image

ยทยทยท On Mon, Feb 6, 2017 at 9:59 AM, A.N.M AL-IMRAN wrote: > Hi Friends, > > I am trying to add images as options for select one/multiple questions. I > know, I can display an image next to the check box or radio button; however, > I do not want the radio buttons, instead, I would like the images to work as > a select option. I found some examples on ODK website, which is for XML, but > how do I program that on xls form? > > Thanks, > Imran > > -- > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "ODK Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to opendatakit+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.
2 Likes

Dear Yaw,

Thanks a lot, it was such a helpful example and I have successfully
completed coding my new form.

Regards,
Imran

A N M AL IMRAN (Imran)
Brossard, QC
Canada
Cell: +1 (438) 501 3576

ยทยทยท On 15 February 2017 at 06:30, Yaw Anokwa wrote:

Hi Imran,

You can use a select_one with an appearance of compact. If you want to
force n columns, use compact-n. Then in your choices sheet, add an
image column with the name of the image file (e.g., red.png). Those
media files need to be uploaded with the form or put in
/sdcard/odk/formName-media/.

I've attached an example form (grid.xls) with a few images
({red,orange,blue}.png) and a screenshot (screenshot.png).

If you want to find out more, see http://xlsform.org/#appearance and
http://xlsform.org/ref-table.

Yaw

On Mon, Feb 6, 2017 at 9:59 AM, A.N.M AL-IMRAN imran3may@gmail.com wrote:

Hi Friends,

I am trying to add images as options for select one/multiple questions. I
know, I can display an image next to the check box or radio button;
however,
I do not want the radio buttons, instead, I would like the images to
work as
a select option. I found some examples on ODK website, which is for XML,
but
how do I program that on xls form?

Thanks,
Imran

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/opendatakit/kvxHOfpbxeI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi @yanokwa,

I've just used your template to successfully add an image selection question to my survey, so thanks are extended a full year after you posted your answer here.

i have noticed one difference between your XLSForm and my own which I'm hoping you might be able to shed some light on.

A closed round bracket, (), is written to the relevant cell after exporting the file from Build. Furthermore when trying to convert the XLSForm into a XForm the converter identifies this as an error so the brackets need removing before conversion can successfully proceed.

While this is not a dealbraker it comes alongide some other strange transpositions occurring when exporting XLSForms about which I have an open post that is being looked at by @Grzesiek2010.

Is there any legimate operation which closed round brackets fulfill when inserted into a relevant cell?

No. I think this is just a remnant of the ODK Build export. @issa this feels like a bug in Build. Agreed?

@yanokwa

Thanks for the reply. In that case @issa should also know the brackets are written to the relevant cell with type:image question..

3 posts were split to a new topic: Why is all my question text replaced by hyphens when I use images in multi-selects?

3 posts were split to a new topic: Https://forum.getodk.org/t/why-is-all-my-question-text-replaced-by-hyphens-when-i-use-images-in-multi-selects/15479

salut,
je suis statisticien st informaticien en licence
je n'ai jamais utiliser ODK
comment faire il me plait
Merci cordialement

Can you share an example of your form, because i can't show my images on the phone. i follow the example before but it's not working to me.

Hi, is that possible to be done in odk2?

Thanks!