The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
If Conditional - Custom Profile Field
Hi,
Running into some trouble finding an old thread on this. I have 2 profile fields, 1 is a radio button between Yes / No and the other is a text box. I'd like to be able to say in my postbit... If Field1 = Yes Then Show Field2 Many thanks in advance for any help ! Cheers |
#2
|
||||
|
||||
Code:
<if condition="$post[field1]"> $post[field2] </if> |
#3
|
|||
|
|||
Thanks Dismounted
If there is any difference if I have 3 options (single selection menu)? 1) Off - no change 2) On1 - "show etc.. etc.." 3) On2 - "show etc.. etc.. 2" Cheers |
#4
|
||||
|
||||
Will the two "on" switches show the same thing?
|
#5
|
|||
|
|||
They would each show [field1].gif and [field2].gif
Thanks for your help btw |
#6
|
||||
|
||||
So it's like this?
If menu is "On1", Show field1.gif If menu is "On2", Show field2.gif Side Note: That looks awfully like Visual Basic . |
#7
|
|||
|
|||
LOL, true
But yep, that's exactly it. |
#8
|
||||
|
||||
Code:
<if condition="$post[fieldx] === '2'"> <img src="$post[field1].gif" border="0" alt="" /> </if> <if condition="$post[fieldx] === '3'"> <img src="$post[field2].gif" border="0" alt="" /> </if> Change the 1 & 2 in $post[field1] & $post[field2] to the field numbers. |
#9
|
|||
|
|||
Anyway I can display this with multiple selections?
<if condition="$post[field5] === '2'"> i.e. <if condition="$post[field5] === '2, 3, 4"> etc.? Cheers |
#10
|
||||
|
||||
Code:
<if condition="$post[field5] === '2' OR $post[field5] === '3' OR $post[field5] === '4'"> Code:
<if condition="in_array($post[field5], array(2,3,4))"> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|