Form.select with images

Hi,

Is it possible to use form.select in such a way that the selection
values are images rather than text ?

I currently use an array like so

<%= form.select :card_type,
[ [ “display_name_1”, :value_1 ],
[ “display_name_2”, :value_2 ] ],
{ :prompt => “Please Select…”} %>

Instead of showing the text “display_name_1”, etc, I would like to
display images.

Thanks!

John,

I think you’ll have to find a JavaScript control that does this. Here
is one (look at “combobox with icons”)

http://www.dhtmlx.com/docs/products/dhtmlxCombo/index.shtml

Then either embed it directly inside your view or via a JavaScriptHelper

Arshak

John L. wrote:

Hi,

Is it possible to use form.select in such a way that the selection
values are images rather than text ?

I currently use an array like so

<%= form.select :card_type,
[ [ “display_name_1”, :value_1 ],
[ “display_name_2”, :value_2 ] ],
{ :prompt => “Please Select…”} %>

Instead of showing the text “display_name_1”, etc, I would like to
display images.

Thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs