Day_ Posted January 13, 2017 Share Posted January 13, 2017 I am using a custom profile field to include members season ticket location (football) using select box. Is there a way for members to reset this to blank, I have a font awesome ticket icon next to the profile field and for some reason it's showing when the user hasn't selected a ticket location, I'm guessing that when editing their profile it has saved as a blank option but including the field still in the post bit. Hope this all makes sense! Link to comment Share on other sites More sharing options...
Nathan Explosion Posted January 13, 2017 Share Posted January 13, 2017 Post the Display Format for the profile up in here. Link to comment Share on other sites More sharing options...
Day_ Posted January 13, 2017 Author Share Posted January 13, 2017 <span class="STholder"><i class="fa fa-ticket"></i> {content}</span> Link to comment Share on other sites More sharing options...
Nathan Explosion Posted January 13, 2017 Share Posted January 13, 2017 Use this instead: <span class="STholder" data-Choice="{content}">{content}</span> And then put something in to your css instead to handle the display of the icon..... If the value that you have in the list for "no choice" is indeed 'nothing' (ie not a space, but just nothing....not sure how you've managed that, unless the field isn't marked as required) then: span.STholder[data-Choice]:not([data-Choice=""]):before{ font-family: FontAwesome; content:"\f145"; padding-right:3px; } If the value that you have in the list for "no choice" is a space (which allows you to then set the field as required) then use this instead: span.STholder[data-Choice]:not([data-Choice=" "]):before{ font-family: FontAwesome; content:"\f145"; padding-right:3px; } Weird feeling of deja vu on this one - have I helped with a previous question about this field for you? I did indeed....gave you the previous way of having it work for you. This one is better, having looked at both now. Link to comment Share on other sites More sharing options...
Day_ Posted January 13, 2017 Author Share Posted January 13, 2017 Works perfectly, thanks @Nathan Explosion, I didn't have any no choice field listed at all, wasn't a required field either so the first bit of CSS worked. Think I did post about it before and you raised it as a bug, nothing ever came of it, my OCD has been niggling since seeing that icon. Link to comment Share on other sites More sharing options...
Nathan Explosion Posted January 13, 2017 Share Posted January 13, 2017 7 minutes ago, daveoh said: Works perfectly, thanks @Nathan Explosion, I didn't have any no choice field listed at all, wasn't a required field either so the first bit of CSS worked. Think I did post about it before and you raised it as a bug, nothing ever came of it, my OCD has been niggling since seeing that icon. No, I didn't say I would raise your request as a bug....that wasn't what I was referring to at all, if you go back and read the topic. You mentioned some strange behaviour about toggling the field types, which I said I would log as a bug. I did provide a solution previously, but as I said...this seems a better option as it removes the need for <i> in the display format, and moves the font-awesome assignment to css. More css content, but potentially less html content depending on topic lengths. Link to comment Share on other sites More sharing options...
Day_ Posted January 13, 2017 Author Share Posted January 13, 2017 Apologies for misreading at the time! Link to comment Share on other sites More sharing options...
Wonster Posted March 15, 2017 Share Posted March 15, 2017 How can I add FontAwesome icon to each field? I want to show the content in topic profile view Link to comment Share on other sites More sharing options...
Wonster Posted March 17, 2017 Share Posted March 17, 2017 Any ideas? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.