vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=327014

Hiding stuff if custom profile field is empty?
by iHunterJ
10 Jan 2019 18:14

Hi. I have a script which is for certain usergroups as demonstrated in this code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I want it to be hidden if 'field9' is empty, but can't work out how to do it.

What code would I need to be using?

TIA.

Dave 10 Jan 2019 19:18


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

A condition like that should work to check if the field is an empty string or NULL.

iHunterJ 11 Jan 2019 12:42

Quote:

Originally Posted by Dave (Post 2598048)
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

A condition like that should work to check if the field is an empty string or NULL.

When I use this condition around my code it shows the following code if the field is empty, I want it to only show the corresponding code if the field isn't empty - any idea?

z3r0 11 Jan 2019 17:17

Try this.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Dave 11 Jan 2019 17:41

Quote:

Originally Posted by iHunterJ (Post 2598055)
When I use this condition around my code it shows the following code if the field is empty, I want it to only show the corresponding code if the field isn't empty - any idea?

Just invert it like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



All times are GMT. The time now is 15:49.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.