![]() |
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 |
Code:
<if condition="$post[field1]"> |
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 :) |
Will the two "on" switches show the same thing?
|
They would each show [field1].gif and [field2].gif
Thanks for your help btw :) |
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 :p. |
LOL, true :)
But yep, that's exactly it. |
Code:
<if condition="$post[fieldx] === '2'"> Change the 1 & 2 in $post[field1] & $post[field2] to the field numbers. |
Anyway I can display this with multiple selections?
<if condition="$post[field5] === '2'"> i.e. <if condition="$post[field5] === '2, 3, 4"> etc.? Cheers :) |
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))"> |
Thank you sir :)
|
All times are GMT. The time now is 10:58 PM. |
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:
|