Support

Account

Home Forums Add-ons Repeater Field Hide subfield if it has no text Reply To: Hide subfield if it has no text

  • You’ll need to do a check for $row['description'] before actually echoing the <p> tag – that’s why I placed if( $row['description']) before echo '<p class="description">.... This check will simply make sure that $row['description'] is not empty.

    If this doesn’t work for you, PHP can also check for empty values in a number of different ways:

    http://php.net/manual/en/function.empty.php
    http://php.net/manual/en/function.is-null.php

    And there’s a discussion of some implementations over at http://techtalk.virendrachandak.com/php-isset-vs-empty-vs-is_null/ !

    Ah, and just for ease of reading: http://diffchecker.com/7za0xnhq 🙂