I really going crazy bananas on this one.. I hope someone can help me.
I got a dropdown(single select) that I want too show different images.
A example:
If I have icons for female and male. I want to show this icons in the drop down list. Instead of the text "Male" or "Female"
In the fields "Profile Edit Value Layout" I have this code:
[cb:if cb_dropdowngender includes "male"]<img src="images/maleicon.png"/>[/cb:if]
[cb:if cb_dropdowngender includes "female"]<img src="images/femaleicon.png"/>[/cb:if]
But it doesnt work.
The result is that the dropdown list disappears.
Do I somehow need to implement some HTML tags like Select or options in the "Profile Edit Value Layout"?
Someone have any idea?
Last edit: 8 years 10 months ago by Henke_Carlsson.
You can't have images inside of the dropdown. You'd need to completely replace the dropdown with something like select2, which would require a new fieldtype plugin. You can output an image when the field displays on profile though using the Profile Value Layout parameter with your IF substitution, but you need to supply live site links to your images as the relative usage won't work with Joomla SEF.
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.
The following user(s) said Thank You: Henke_Carlsson