• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Custom User Fields Multiple Images

#1
Ok this is what im trying to do.. Add a custom field with multiple options and according to the option chosen, the member would get a different post bit image .

I currently am able to to make a custom field that allows an image to be shown on the post bit..
but im not sure how to make the different options "possible choice" options to output different "Value Display HTML:" results.

If this is possible .. i would greatly appreciate being pointed in the right direction..
 

mistypants

Well-known member
#2
Use this for Value Display HTML:
Code:
<img src="http://www.yoursite.com/{$value}.png" />
And then just save the different images with the corresponding value name.
 

James

Well-known member
#3
Yeah, if you just make the image name the value of the custom user field, it'll work fine without any additional processing.
 

Jake Bunce

XenForo moderator
Staff member
#4
To be clear, multiple selection fields (where the user can select multiple values at once) will have the "Value Display HTML" applied to each of the selected values. So if your "Value Display HTML" contains an img tag and the user selects two values then they will have two images that show up.
 
#5
To be clear, multiple selection fields (where the user can select multiple values at once) will have the "Value Display HTML" applied to each of the selected values. So if your "Value Display HTML" contains an img tag and the user selects two values then they will have two images that show up.
so is there a way to make so they can only chose 1 and not have multiple options?
 

Tracy Perry

Well-known member
#8
On a related subject - how would you strip the "," that is placed between each image on a multiple selection choice?

EDIT:

Ahhh... let me butt my head up against that wall enough times and I can eventually figure it out. very simple to do.

Code:
.messageUserBlock .userField_15000 {
color: rgba(192, 21, 21, 0);
 
}
Place into EXTRA.css
Where the .userField_xxxx is the custom field name and the color makes it transparent. :p