Announcement

Collapse
No announcement yet.

Condition statement

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

  • Condition statement

    I'm using the following statement to test if the field is emty.
    HTML Code:
    <if condition="$bbuserinfo[field20]">
    <td class="alt1" align="center">$bbuserinfo[field20] </td>
    <else />
    <td align="center" bgcolor="#ffff66">
    <font size="-2">required </font></td>
    </if>
    It works fine except that if the field = 0, the statement is false.
    How can rewrite it so as long as something is in the field, the statement is true.
    ...steven
    www.318ti.org (vB3.8) | www.nccbmwcca.org (vB4.2)
    bmwcca.org/forum | m135i.net
    "I tried to clean this up but this thread is beyond redemption." - Steve Machol

  • #2
    Code:
    <if condition="$bbuserinfo[field20] !=''">
                        <td class="alt1" align="center">$bbuserinfo[field20] </td>
    <else />
    <td align="center" bgcolor="#ffff66">
                            <font size="-2">required </font></td>
                        </if>

    Comment


    • #3
      That was quick. I though I'd be able to go to sleep.
      != is NOT?
      ...steven
      www.318ti.org (vB3.8) | www.nccbmwcca.org (vB4.2)
      bmwcca.org/forum | m135i.net
      "I tried to clean this up but this thread is beyond redemption." - Steve Machol

      Comment


      • #4
        Yep.

        Comment

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