uMap: How to display label in popup only if the field is filled?

I’m working on a map in uMap and using popup templates to display information about features.

I know I can use e.g. {operator} in the popup template to display the value of the operator field, and that works fine. But I would like it to appear as something like:

Operator: value

— that is, with a label before the actual value.

The problem is that if I simply write:

Operator: {operator}

— then the popup always shows “Operator:” even if the operator field is empty for a given object. That results in a blank line with just the label.

Does anyone know if it is possible to make a label + value like "Operator: {operator}" appear only when the operator field is defined, in a uMap popup?

Thanks in advance!

1 Like

The ability to do this is an open issue:

I don’t know if there is any other way of achieving this in the meantime. I suppose if you have enough control over your source data you could add a synthetic field that would either hold the whole text for that line or be blank.

1 Like