![]() |
Need help with elseif contitional for single-selection radio buttons
Hi,
I'm hoping this is the correct forum for asking this. I have added a custom profile field with a single-selection radio button with the options "No" and "Yes". These are field22 and No is set as default. The option will make the user choose if he wants to see a latest threads box or not. I have tried the following: Code:
<vb:if condition="$post['field22']=='No'"> I would really appreciate if someone could tell me where I got it wrong, or if there is another way to do this. I have also tried switching No and Yes with the same result. Thanks in advance :) |
try 0 in place of No and 1 in place of yes.
|
What template did you add your code to?
|
Quote:
Quote:
The template is named "MARCO1 Latest Forum Threads" The code is as follows: Code:
<li class="forumbit_nopost L1" id="cat{vb:raw forum.forumid}"> You can see the box in action underneath the navbar here http://www.radioctrl.com/forum.php Would the conditionals work if this was added to the navbar template instead, or would that break the script? |
Quote:
HTML Code:
<vb:if condition="$bbuserinfo['field22']=='No'"> (there's no reason to have an 'else' unless you want to insert some alternative HTML). |
Thanks for looking into this, kh99 :)
It's working perfectly now. $bbuserinfo did the trick! Thanks a million! Edit: Added the elseif conditional to make it show for guests as well. Good times! |
All times are GMT. The time now is 11:30 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|