Views 3 Template or UI question I have a text field that contains multiple values. That field does not always contain any values. The field needs to have a label when displayed.

IOW, the row should look like one rows below

CoAuthor: Person X, Person Y

or

CoAuthor: Person X

Here is my issue: When I use the view UI to add the label I get

CoAuthor: Person X, CoAuthor: Person Y

When I use the template,

print $fields['field_coauthor']-&gt;content; 


I can not hide the field when empty so I end up with

CoAuthor: (and no value)

Is there a way to add a conditional to the template so that I do not end up with a label and no data? Or configure the view to include the label once... and not add it for every entry?
I am actually a bit puzzled by your View result, because the default settings for fields should give you:

CoAuthor: Person X, Person Y

when there is more than one author (and this I presume, is what you want?)
And since Views also have a setting: &quot;Hide if empty&quot; under *No results behavior&quot;, it should be trivial to get this right using fields.
Anyway, this is how I've set this up using Views:
First, I click on Format - Show: Content and switch that to Fields.
Second, I tick Provide default field wrapper elements and Hide empty fields.
Third, under Fields I click Add and add the &quot;CoAuthor&quot; field. I tick Create a label, and Place a colon after the label. Under Multiple field settings, I tick Display all values in the same line.  I also tick Simple separator and make sure it is ,  (comma followed by space, which is the default).Then under No results behavior, I leave No results text blank, and tick Hide if empty and Hide rewriting if empty.
Fourth, I navigate to Format - Show: Settings and tick to make sure CoAuthor is an inline field.
After doing all this, the output should be nothing if there are no CoAuthor, and for the other two cases:

CoAuthor: Person X
CoAuthor: Person X, Person Y

As for using a template, you should be able to wrap the PHP generating the output in a test that checks for a non-empty field, e.g.:
if (!empty(print $fields['field_coauthor']-&gt;content)) {

I not sure where the template fragment you post come from, so I haven't posted the full code, but I hope you get the idea.