1. 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

Discussion in 'Styling and Customization Questions' started by presidentYT, Mar 5, 2013.

  1. presidentYT

    presidentYT Member

    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..
     
  2. mistypants

    mistypants Well-Known Member

    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.
     
  3. James

    James Well-Known Member

    Yeah, if you just make the image name the value of the custom user field, it'll work fine without any additional processing.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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. presidentYT

    presidentYT Member

    so is there a way to make so they can only chose 1 and not have multiple options?
     
  6. presidentYT

    presidentYT Member

    awesome..thank you
     
  7. presidentYT

    presidentYT Member

    nevermind.. i played with it.. thanks you guys
     
  8. Tracy Perry

    Tracy Perry Well-Known Member

    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
     
    CaptainMorgan likes this.

Share This Page