shihs VIP
Total posts: 5
11 Aug 2015 01:14

hi i am new here i want to know how to make a select field or check box field where can i display the value as an image but in the adding and filter the value show as text

for example if i have a field for colors i want to selcet the value as text in adding form ('red','yellow','black') but at the item view and list view i want to images for colors

thanks in advance

Last Modified: 12 Aug 2015


Sergey
Total posts: 13,748
11 Aug 2015 13:37

There are few different ways to do that.

  1. Insert images into values parameter of the field.
red <img src="/images/colors/red.png">  
green <img src="/images/colors/green.png">  

But that will shopw image everywhere possible. It will not show only in select dropdown.

  1. If you use color in particular you can use ^
red^red
green^#00ff00

Then value text will be highlighted with that color.

  1. last method is customise field output and input templates. Read this for more details.

shihs VIP
Total posts: 5
12 Aug 2015 01:07

any other ideas please


pepperstreet VIP
Total posts: 3,837
12 Aug 2015 11:32

shihs any other ideas please

Sorry, what else? IMHO, this is a quite large palette of options.
Actually, you have total freedom with field input/output templates.
You could also use the field value in your record/list template to populate a DIV's CSS class name. Then style it as a "color-swatch".

Powered by Cobalt