diff --git a/entityreference_prepopulate.module b/entityreference_prepopulate.module
index 46076d7..1f05a84 100644
--- a/entityreference_prepopulate.module
+++ b/entityreference_prepopulate.module
@@ -88,6 +88,21 @@ function entityreference_prepopulate_og_field_default_value($entity_type, $entit
 }
 
 /**
+ * After-build form function to enable storage of &_GET parameters in persistent storage 
+ */
+function entityreference_prepopulate_after_build_form($form, &$form_state) { 
+  $values = &drupal_static('entityreference_prepopulate_field_attach_form');  
+  if (!empty($values['entity_prep'])) {
+    $_SESSION['entity_prep'][$form['form_build_id']['#value']] = array();
+    foreach ($values['entity_prep'] as $field => $value) {
+      $_SESSION['entity_prep'][$form['form_build_id']['#value']][$field] = $value;
+    }
+  }  
+  
+  return $form;
+}
+
+/**
  * Implements hook_field_attach_form().
  */
 function entityreference_prepopulate_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) {
@@ -130,7 +145,17 @@ function entityreference_prepopulate_field_attach_form($entity_type, $entity, &$
       }
 
       $field = $value['field'];
-      if (entityreference_prepopulate_get_values_from_url($field, $instance)) {
+      $values = entityreference_prepopulate_get_values_from_url($field, $instance);      
+      if ($values) {
+        //Store the values in persistent storage so they're available in future ajax requests
+        //Otherwise, values will not be accepted since elements have either #access = FALSE or #disabled = TRUE
+        //We don't have a unique identifier at this point; use an after-build function to get the form_build_id        
+        if (!isset($cache)) {
+          $cache = &drupal_static(__FUNCTION__, array());
+          $form['#after_build'][] = 'entityreference_prepopulate_after_build_form';
+        }
+        
+        $cache['entity_prep'][$field_name] = $values;      
         if ($settings['action'] == 'disable') {
           $form[$field_name][$lang]['#disabled'] = TRUE;
         }
@@ -210,15 +235,24 @@ function entityreference_prepopulate_get_values_from_url($field, $instance, $fla
   }
   $cache[$identifier] = FALSE;
 
-  if (empty($_GET[$field_name])) {
-    return;
+  if (empty($_GET[$field_name])) {    
+    //This may be an ajax request; check for a form_build_id and stored value(s) in session
+    if (isset($_POST['form_build_id']) && 
+      !empty($_SESSION['entity_prep'][$_POST['form_build_id']][$field_name])) {      
+      $ids = $_SESSION['entity_prep'][$_POST['form_build_id']][$field_name];
+    }
+    else {    
+      return;
+    }
   }
-
+  
   if (empty($instance['settings']['behaviors']['prepopulate']['status'])) {
     return;
   }
 
-  $ids = explode(',', $_GET[$field_name]);
+  if (!isset($ids)) {
+    $ids = explode(',', $_GET[$field_name]);
+  }
 
   // Check if the IDs are valid, and get filter out the ones that are not valid.
   $handler = entityreference_get_selection_handler($field, $instance);
