• Resolved dpeeters

    (@dpeeters)


    Hi there,

    Currently, I have several fields in the invoice template, including;
    <div>VAT #:&nbsp;<?php $this->custom_field('vat_number'); ?></div>

    However, the text VAT #: is visible on the invoice, regardless of whether the user enters a VAT number or not.

    How can I only show the text when the user enters the invoice number?

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    If you include the VAT# bit in the php it will only be displayed when the field has a value (see documentation):

    
    <div><?php $this->custom_field('vat_number', 'VAT #:'); ?></div>
    
Viewing 1 replies (of 1 total)
  • The topic ‘Hide field on invoice if empty’ is closed to new replies.