I wan't to create webform with field where you can choose one image from group of other displayed images using radio buttons (like extended version radio buttons with images)

How to do it using webform module? I can't find such a feature

Comments

quicksketch’s picture

Status: Active » Closed (won't fix)

This will not be implemented in Webform. You'd need to implement this through some extensive CSS and JS work. You can take a look at THEMING.txt to see how you can add CSS and JS to webform forms.

pablo demono’s picture

Thank you for your reply, I need to write such a functionality for webforms, probably I choose way using CSS/JS or thinking about connect imagefield with radio buttons (from webform)

Best regards

a.medhat’s picture

a.medhat’s picture

$imageOptions = array(
"1" => 'image URL as html tag',
"2" => 'image URL as html tag',
"3" => 'image URL as html tag',
"4" => 'image URL as html tag',
"5" => 'image URL as html tag',
"6" => 'image URL as html tag',
);

$form['image'] = array(
'#type' => 'radios',
'#options' => $imageOptions,
'#title' => t('Chose the theme')
);

giorgio79’s picture

Status: Closed (won't fix) » Active

I think this could be made more simple than using CSS and JS!

If we would have an additional field for the label, instead of only key / value where we could enter an img for example.

What do you think?

quicksketch’s picture

If we would have an additional field for the label, instead of only key / value where we could enter an img for example.

I think this is out of scope. In order to be truly easy to use, you'd need to provide upload fields for those images. If you're just providing textfields it means you'll be access the server anyway, in which case I think CSS should be used in your theme.

giorgio79’s picture

Status: Active » Closed (fixed)

Ok thanks. I used a hook form alter to display a checkboxes form element, and in the labels I easily placed images that way :)

I am not a fan of css and javascript :)