Type Drop Down in profile

13 years 3 months ago #149753 by OLDBOY
Type Drop Down in profile was created by OLDBOY
I want to do when registering a person pointing a Drop Down field image
Drop Down field can display text, but how to do show image?
Need Drop Down image:

But i have this:


How to do this?Help please

Sorry for my english i use google traslete from russian

Please Log in to join the conversation.

13 years 3 months ago #149787 by krileon
Replied by krileon on topic Re:Type Drop Down in profile
You can't. Drop-down elements can't support HTML. Not a limitation of CB, but a limitation to HTML all together; it would not validate or even work without custom code such as ajax or maybe dhtml.

Best I can suggest is to use CSS to achieve what you're wanting. Example as follows.

[code:1]
#cb_dropdown option[value=Value1] {
background-color: red;
}
[/code:1]

The above is for the field cb_dropdown and the first value is Value1. Simply adjust as necessary. Example of complete drop-down as follows.

[code:1]
#cb_dropdown option[value=Value1] {
background-color: red;
}

#cb_dropdown option[value=Value2] {
background-color: blue;
}

#cb_dropdown option[value=Value3] {
background-color: green;
}
[/code:1]

It would be better to use Firebug for Firefox and inspect the drop-down and use the options actual IDs, but changing the background based on value is a more understandable and user friendly approach.

You can of course change it from a color to an actual background image. More on CSS usage can be found here .


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.178 seconds

Facebook Twitter LinkedIn