diff --git a/fac.module b/fac.module
index 5293b7a..8da35c1 100644
--- a/fac.module
+++ b/fac.module
@@ -177,6 +177,7 @@ function fac_page_build(&$page) {
     'allResultsLink' => variable_get('fac_all_results_link', TRUE),
     'allResultsLinkThreshold' => variable_get('fac_all_results_link_threshold', -1),
     'highlightEnabled' => $highlight_enabled,
+    'appendToSelector' => variable_get('fac_appendto_selector', NULL),
   );
   $page['content']['#attached']['js'][] = array(
     'data' => array(
diff --git a/inc/fac.admin.inc b/inc/fac.admin.inc
index 5548469..50cf3f4 100644
--- a/inc/fac.admin.inc
+++ b/inc/fac.admin.inc
@@ -47,6 +47,13 @@ function fac_settings_form($form, $form_state) {
     ),
   );
 
+  $form['behavior']['fac_appendto_selector'] = array(
+    '#type' => 'textfield',
+    '#title' => t('AppendTo selector'),
+    '#description' => t('Enter the jQuery selector which should be used to append the results. If left empty, the results will be injected after the closest form.'),
+    '#default_value' => variable_get('fac_appendto_selector', ''),
+  );
+
   $form['behavior']['fac_empty_result'] = array(
     '#type' => 'textarea',
     '#title' => t('Text to show when the search input gets focus and there is no search term in the input.'),
diff --git a/js/jquery.fastautocomplete.js b/js/jquery.fastautocomplete.js
index 28c9b3b..62941c4 100644
--- a/js/jquery.fastautocomplete.js
+++ b/js/jquery.fastautocomplete.js
@@ -21,7 +21,8 @@
       emptyResult: '',
       allResultsLink: true,
       allResultsLinkThreshold: -1,
-      highlightEnabled: false
+      highlightEnabled: false,
+      appendToSelector: null
     }, options);
 
     // Check if a jsonFilesPath is set before doing anything.
@@ -105,7 +106,10 @@
         emptyResults.appendTo(facResult);
         var form = $(this).closest('form');
         form.css('position', 'relative');
-        facResult.appendTo(form);
+        if (!settings.appendToSelector) {
+          settings.appendToSelector = form;
+        }
+        facResult.appendTo(settings.appendToSelector);
 
         // When a character is entered perform the necessary ajax call. Don't
         // respond to any special keys.
