Field Class Dependencies The question is pretty straightforward. How can I add a class on field A, if field B is empty? I can not find any module does this feature. The Conditional Fields does not have the class feature too. Can this done by programmatically? If so, how?
One solution here is is to use template_preprocess_field function. In your template.php add a MYTHEME_preprocess_field function and perform a check on the node's field value to determine a class that you set in the classes_array variable.

function MYTHEME_preprocess_field(&amp;$variables) {
  $node = menu_get_object();

  //Add a new CSS class to field_MYHIDDEN_FIELD
  if($variables['element']['#field_name'] == 'field_MYHIDDEN_FIELD') {

    //Check field_MYCHECKED_FIELD for an empty value
    $new_class = (!isset($node-&gt;field_MYCHECKED_FIELD[LANGUAGE_NONE][0]['value'])) ? 'mytheme-field-novalue' : 'mytheme-field-value';
    $variables['classes_array'][] = $new_class;
  }
}