1

This is what I would like to do:

When a user registers on the website they have to give in if some options like for example if they are politically engaged, professionally engaged, an expert, ... .

I also want a field that contains 3 images. And based on the chosen options of the user I would like to select 1,2 or 3 of them. So the user can contain image 1 & 2 or ... .

So I was thinking of 3 images with 3 checkboxes and cross the checkboxes next to the images (programmatically). But is this a good way to do this? And if yes, how can I implement this?

1

You can do that by the following.

Go to Configuration » People » Account settings

Add a Field type : List (text) and WIDGET: Check boxes/radio buttons

In Allowed values list textarea add key|<img src ='/your/path/to/image' />

Enter one <img> per line and set Number of values as Unlimited (to appear as checkboxes)

That's it. I tested it and working fine.

Add key whatever you want.You may have to make minor CSS changes in order to align checkbox and image.

Hope this helps.

  • @nielsv Glad to hear that. :) – Krishna Mohan Sep 17 '14 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.