Forum /
Sencha Touch 1.x Forums /
Sencha Touch 1.x: Discussion /
form select field with images as values rather than text?
form select field with images as values rather than text?
I have a selectfield that I'd like to populate with images (one star, two stars, three stars) rather than text.
I tried putting an image in where the text goes in an option array..like so.
{
xtype: 'selectfield',
name : 'priority',
label: 'Priority',
options: [
{text: '<img src="myimage.png">', value: 'high'},
{text: 'Medium', value: 'medium'},
{text: 'Low', value: 'low'}
]
},
The image resolves in the overlay to select the options..but when one is selected I get the label on my form an then the html for the image..so...
priority: <img src="myimage.png">.
I tried using html: instead of text: in my option array which isn't documented anywhere..and just got a blank field.
has anyone managed to do this?
thanks!
adana
Sencha - Senior Forum Manager
Currently you cannot do that. You will have to creat your own instance and do some fun stuff. I did something like this only with a div and a Picker for my ColorPickerField.
Git here https://github.com/mitchellsimoens/E...lorPickerField
is there a way now?
is there a way now?
Any development to add image in Ext.selectField in sencha touch2 ?
Similar Threads
By madhusudhan in forum Sencha Touch 1.x: Discussion
Replies: 0
Last Post: 16 Jan 2011, 9:31 PM
By chaitu45 in forum Sencha Touch 1.x: Discussion
Replies: 0
Last Post: 12 Oct 2010, 10:41 AM
By ssdesign in forum Sencha Touch 1.x: Discussion
Replies: 1
Last Post: 12 Aug 2010, 7:37 PM
By mjlecomte in forum Ext 2.x: Help & Discussion
Replies: 2
Last Post: 13 Jul 2008, 6:23 PM
By zonereseau in forum Ext 2.x: Help & Discussion
Replies: 8
Last Post: 11 Apr 2008, 10:54 AM
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us