Announcement

Collapse
No announcement yet.

Help with IF statements & User Profile Field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with IF statements & User Profile Field

    Hi. I would like to know the way how do I perform a check with an IF statement using a specific "User Profile Field" value?

    What I mean is, if I have a profile field using 2 radio buttons, Call them 'option 1' and 'option 2' how do I make code display only if option 2 is checked?

    example, this is what I usually use to see if there is any data in a single line checkbox:

    <if condition="$userinfo['field8]">


    If im using single selection radio buttons, how do I make it check for option 2 selected? See below for example of what im tryiong to do:

    <if condition="$userinfo['field8] = option 2">

    Thanks for any help

  • #2
    Originally posted by NeuroLancer View Post
    If im using single selection radio buttons, how do I make it check for option 2 selected? See below for example of what im tryiong to do:

    <if condition="$userinfo['field8] = option 2">

    Thanks for any help
    As far as I remember the only way in templates is:
    Code:
    <if condition="$userinfo['field8] == 'OPTION_TITLE_HERE'">
    P.S. I don't remeber if you need single quotes or not.
    ...... sigpic ...... "А стукачков мы не любим!"

    My Modification: Quote Post in PM - passes to new personal message (PM) post's text, username, etc.

    Comment


    • #3
      works just fine

      Thanks!

      Comment

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