Jump to content

Clear profile field


Day_

Recommended Posts

Posted

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!

Screen Shot 2017-01-13 at 10.38.41.png

Screen Shot 2017-01-13 at 10.39.11.png

Screen Shot 2017-01-13 at 10.38.31.png

Screen Shot 2017-01-13 at 10.43.31.png

Posted

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. :D

Posted

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.

 

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

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...