vBulletin Mods

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

Conditional Profile Field Status and Notices
by richardevans123
06 Feb 2013 19:10

Hey Guys,

I have got a Custom Profile Field and it acts like a status. Similar to Online and Offline, but Active or Non-Active.

What I'd like to do is when a User Selects the "Non-Active" option, a Notice appears saying that the status is "Non-Active" please change to Active.

What coding do I need to do this?

Thanks

LifesGreatestGift 07 Feb 2013 15:25

depends what template you want to put it in. But I would imagine something like this

OPTIONS FOR DROPDOWN
Non-Active [has an id of 0]
Active [has an id of 1]


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

Where # is your field id, and 0 is the id of the non-active selection.

richardevans123 07 Feb 2013 15:53

Okay, the coding is right, but changing the "0" and "1" isn't actually changing anything. I'm working on 4.2.0 PL3 if that helps

LifesGreatestGift 07 Feb 2013 16:01

i see no custom dropdown profile field on your site.

--------------- Added 07 Feb 2013 at 16:02 ---------------

try == '1' instead of == 1

--------------- Added 07 Feb 2013 at 16:15 ---------------


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

Try that.

--------------- Added 07 Feb 2013 at 16:18 ---------------

If that doesnt work then try

"Second Option Selected"

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

dont remember exactly but it could be either [field11] or ['field11'] try both. :)

richardevans123 07 Feb 2013 16:23

It's done via radio buttons. And neither of those codes work. :/

LifesGreatestGift 07 Feb 2013 16:27

What template are you posting these in? header/navbar?

richardevans123 07 Feb 2013 16:31

I'm doing it via a notice

LifesGreatestGift 07 Feb 2013 16:43

May be a bug as


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

should work.

richardevans123 07 Feb 2013 16:47

Got it to work! :D

LifesGreatestGift 07 Feb 2013 16:48

try using a dropdown single-selection and these conditionals. may just be with radio button.

--------------- Added 07 Feb 2013 at 16:48 ---------------

What was the code that worked? I am curious.

richardevans123 07 Feb 2013 16:56


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

That one!

Thanks for your help


All times are GMT. The time now is 07:52.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, 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.