Adding conditional statements to custom text fields in views I have custom text fields set to display two items as follows:


  [field_title]: [field_subtitle]


Is there a way I can get rid of the colon if the subtitle field has no value? via php or javascript?
Sure.


Edit both fields -- [field_title] and [field_subtitle] -- so that both are "exluded from display"
Edit [field_subtitle], and select Rewrite the output of this field

In the box for the rewritten value, enter : [field_subtitle]
Make sure Hide rewriting if empty is checked at the bottom

Create a third field whose type is Global: custom text

Unlike the first two existing fields, do not check the Exclude from display box -- leave this one visible
In the Text box for that field (the value), enter [field_title][field_subtitle] (no spaces in between)



Hope that helps... :)