Conditional filed in Drupal views

In a view, the output for a field is rewritten as follows:
<div class="company-profile-title">Contact Person:</div>
<div class="company-profile-data">[field_up_oi2_contact_name_value]</div>

Open in new window


I need to make it so that if [field_up_oi2_contact_name_value] is empty, then [field_up_oi1_ceo_name_value] is displayed instead.

How can I achieve that?
jiiins2Asked:
Who is Participating?
 
h4hardyConnect With a Mentor Sr. Software EnginnerCommented:
0
 
jiiins2Author Commented:
Thanks, I just found "conditional fields" and it works just nice. My problem now is that the view doesn't have all the fields I need, i.e. $data missing something. Do you know by chance how to modify the query that populates $data?
0
 
jiiins2Author Commented:
Never mind, I got it.
0
All Courses

From novice to tech pro — start learning today.