Closed (fixed)
Project:
Webform
Version:
6.x-2.4
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Feb 2009 at 16:00 UTC
Updated:
8 May 2010 at 20:51 UTC
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
Comment #1
quicksketchThis 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.
Comment #2
pablo demono commentedThank 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
Comment #3
a.medhat commentedComment #4
a.medhat commented$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')
);
Comment #5
giorgio79 commentedI 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?
Comment #6
quicksketchI 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.
Comment #7
giorgio79 commentedOk 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 :)