Browse Source

Merge branch 'revert-663-revert-628-541-tv3-ajax_fields' of github.com:tripal/tripal into revert-663-revert-628-541-tv3-ajax_fields

Stephen Ficklin 6 years ago
parent
commit
0edfa6c993
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tripal_ds/tripal_ds.module

+ 1 - 1
tripal_ds/tripal_ds.module

@@ -481,7 +481,7 @@ function tripal_ds_field_display_alter(&$display, $context){
             foreach ($parent_field_info as $parent_key => $parent_field) {
               if (strpos($parent_field, 'single_field') !== false) {
                 $field_name = str_replace("_single_field", "", $parent_field);
-                drupal_add_js('jQuery(document).ready(function () { jQuery("#tripal-entity-' . $bundle_info->term_id . '--' . $field_name . '").addClass("ds-hide") });', 'inline');
+                drupal_add_js('jQuery(document).ready(function () { jQuery("#tripal-entity-' . $context['entity']->id . '--' . $field_name . '").addClass("ds-hide"); });', 'inline');
               }
               // We want to use JavaScript to remove the fields rather than
               // CSS to hide them so that when users theme the table of