If Condition on Profile Fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • -Force
    New Member
    • Jan 2009
    • 20

    If Condition on Profile Fields

    I have the code here.

    Code:
    <if condition="$post['field7']"><td width="25%" valign="top"><font color="#666666" size="1">$post[field7]</font></td></if>
    Basically what it does if someone fills out profile field #7 their input is posted under their signature.

    However, I want those who do NOT have anything filled out in their signature (hence profile field 7 is empty) to instead of show the text N/A like below. I think an else statement should be used but I don't exactly get what to input for the if condition.

    Code:
    <if condition="$post['field7']"><td width="25%" valign="top"><font color="#666666" size="1">N/A</font></td></if>
    Last edited by -Force; Tue 5 May '09, 11:47am.
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    Something like this?
    HTML Code:
    <if condition="$post['field7']">
    <td width="25%" valign="top"><font color="#666666" size="1">$post[field7]</font></td>
    <else />
    <td width="25%" valign="top"><font color="#666666" size="1">N/A</font></td>
    </if>

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools &lt;- awesome site for html/css help

    Comment

    • -Force
      New Member
      • Jan 2009
      • 20

      #3
      Yeah that was it, thanks a bunch, I wasn't sure.

      Comment

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