Skip to content
beprintlearn – Home

Showing a label only when the field is filled

“Phone:” only appears when there's a number

No mobile number, only the phone; no phone, only the mobile number – with no separator and no empty label.

1:27 min · Published on 8 November 2026

What it's about

  • Each label hangs on a rule: [Phone:{LabelPhone}] only shows when Phone is filled.
  • The separator only shows when both numbers are there: [&Phone&Mobile: | ].
  • “Phone: ” comes from a hidden helper field, because a second colon in the rule text empties the box.
Transcript

Click a timestamp to jump to that point in the video.

  1. The buyer leaves the Mobile field empty. Now the card shows only the phone – no separator, no empty label.
  2. And the other way around: without a phone number, only the mobile number shows.
  3. Behind it are three rules in the box content. The first: if there's a phone number, the label goes in front of it. The second: only when Phone and Mobile are both filled does the separator go in between. The third does the same for Mobile.
  4. Why isn't the label simply written as text in the rule? Then the bracket would have a second colon. And a second colon empties the whole box – with no error message. That's why the label comes from a helper field.
  5. In the back end, open the print template in the layouter, pick the box Contact, and click Inhalt bearbeiten. The three rules are in the first line.
  6. You set up the helper fields in the Special Field Options. LabelPhone is hidden – the buyer never sees it. Its default text is the label: Phone, colon, space.
  7. Here's how it looks live.
  8. Label and separator only show up where there's a number.

Also in: Rules & automationAdvanced course: print templates