if / else conditional statement based on user profile field?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ryancooper
    Member
    • Mar 2003
    • 92

    if / else conditional statement based on user profile field?

    I would like to add a profile field that will allow users to hide a section of the postbit. ( i have a shop set up that shows items in the users sig)

    I have a user profile field set up to hide / show lanyard. Field 22

    How would I add a if conditional that will show X if it is set to show and will hide X if it is set to hide.


    <if condition="$post['field22'] == Show">Show this<else> hide this</if>

    also tried

    <if condition="$post['field22'] & Show">Show this<else> hide this</if>


    Also tried:
    <if condition="$post['field24'] == 'Show'">Show this</if>

    Tried this and it shows X but when i set it to side it still show X
    <if condition="$post['field24'] != 'Show'">Show this</if>

    Tried above but it didn't work?

    Thanks,
    Ryan
    Last edited by ryancooper; Fri 18 Nov '11, 9:44am.
  • ryancooper
    Member
    • Mar 2003
    • 92

    #2
    Got it... In case anyone else need it...

    <if condition="$bbuserinfo[field24] == 'Show'"> Show This</if>

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...