Announcement

Collapse
No announcement yet.

Checking Custom Field

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

    Checking Custom Field

    Hi,

    I'm trying to test a custom field so I can display text accordingly but not having any luck.

    If the custom field is empty I don't want anything to show. If there is anything in the field I want the text to display.

    Maybe there is a better way to do this I am just stumped right now. Custom Fields are assigned.

    HTML Code:
    <mvt:if expr="len(trim(l.settings:product:customfield_values:customfields:MsgLn5)) LE 0">
    Show nothing
    <mvt:else>
    <li><mvt:item name="customfields" param="Read_Product_Code(l.settings:product:code,' MsgLn5', g.MsgLn5)" />&mvte:global:MsgLn5;</li>
    </mvt:if>

    Thanks

    #2
    Would "<mvt:exit />" work versus the "Show nothing" ????

    Comment


      #3
      Oh I am not familiar with that way. If I am following you then yes, "show nothing" was just my way of trying to explain this LOL!

      How would I incorporate that?

      Comment


        #4
        try just:

        Code:
        <mvt:if expr="l.settings:product:customfield_values:customfields:MsgLn5">
        Show nothing
        <mvt:else>
        <li><mvt:item name="customfields" param="Read_Product_Code(l.settings:product:code,' MsgLn5', g.MsgLn5)" />&mvte:global:MsgLn5;</li>
        </mvt:if>
        and also test right before with
        [&mvt:product:customfield_values:customfields:Ms gLn 5;]<br>
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment

        Working...
        X