diff --git a/ds.module b/ds.module
index 6de5807..6f48bcd 100644
--- a/ds.module
+++ b/ds.module
@@ -149,6 +149,20 @@ function ds_form_field_ui_display_overview_form_alter(&$form, &$form_state) {
 }
 
 /**
+ * Implements hook_field_extra_fields_display_alter().
+ */
+function ds_field_extra_fields_display_alter(&$displays, $context) {
+  if (!empty($displays) && $layout = ds_get_layout($context['entity_type'], $context['bundle'], $context['view_mode'])) {
+    foreach ($displays as $key => $display) {
+      // If this field is not in the layout, mark it as visible on the display.
+      if (!isset($layout['settings']['fields'][$key])) {
+        $displays[$key]['visible'] = FALSE;
+      }
+    }
+  }
+}
+
+/**
  * Implements hook_module_implements_alter().
  */
 function ds_module_implements_alter(&$implementations, $hook) {
