Dynamic Well-known member Sep 18, 2018 #1 Hi everyone, I have created some custom user fields with a dropdown selection. Is it possible to make the blank field display something like "Disabled" etc rather than just remaining blank? Can it be done with jquery or a simple template mod? Thanks.
Hi everyone, I have created some custom user fields with a dropdown selection. Is it possible to make the blank field display something like "Disabled" etc rather than just remaining blank? Can it be done with jquery or a simple template mod? Thanks.
Dynamic Well-known member Sep 21, 2018 #3 Worked it out. Just in case anyone is interested, here is the code. Code: <xf:js> $('select option') .filter(function() { return !this.value || $.trim(this.value).length == 0; }) .text('YOUR-TEXT-HERE'); </xf:js> Upvote 0 Downvote
Worked it out. Just in case anyone is interested, here is the code. Code: <xf:js> $('select option') .filter(function() { return !this.value || $.trim(this.value).length == 0; }) .text('YOUR-TEXT-HERE'); </xf:js>
E EchoRomeo Active member Sep 3, 2023 #4 I have this exact issue. Some time has passed since this post...does anyone know a better (more straightforward) way to do this at this point? Upvote 0 Downvote
I have this exact issue. Some time has passed since this post...does anyone know a better (more straightforward) way to do this at this point?