diff --git a/includes/nodequeue.admin.inc b/includes/nodequeue.admin.inc
index ca2898c..da3f0a0 100644
--- a/includes/nodequeue.admin.inc
+++ b/includes/nodequeue.admin.inc
@@ -117,6 +117,12 @@ function nodequeue_node_tab($node) {
   if (!$queues) {
     return FALSE;
   }
+  $publish_only_queues = array();
+  foreach ($queues as $key => $value) {
+    if ($value->publish_only) {
+      $publish_only_queues[] = $value->qid;
+    }
+  }
   $header = array();
   $header[] = array('data' => t('Title'), 'field' => 'title', 'sort' => 'asc', 'class' => array('nodequeue-title'));
   $header[] = array('data' => t('Max nodes'), 'field' => 'size', 'class' => array('nodequeue-max-nodes'));
@@ -188,6 +194,9 @@ function nodequeue_node_tab($node) {
           'purl' => array('disabled' => TRUE))
       );
     }
+    if (!$node->status && in_array($subqueue->qid, $publish_only_queues)) {
+      $op = t('Only published nodes allowed.');
+    }
     $row = array();
     $row[] = array(
       'class' => array('nodequeue-title'),
@@ -447,6 +456,13 @@ function nodequeue_edit_queue_form($form, &$form_state, $queue) {
     '#description' => t('Ordinarily items are added at the back of the queue, and excess nodes are removed from the front. If checked, this behaviour is reversed: nodes will be added at the front and removed from the back.'),
   );
 
+  $form['publish_only'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Allow only published nodes'),
+    '#default_value' => isset($queue->publish_only) ? $queue->publish_only : 0,
+    '#disabled' => isset($queue->qid) ? TRUE : FALSE,
+  );
+
   $form['link'] = array(
     '#type' => 'textfield',
     '#title' => t('Link "add to queue" text'),
diff --git a/nodequeue.install b/nodequeue.install
index 09f47f9..4adf73d 100644
--- a/nodequeue.install
+++ b/nodequeue.install
@@ -97,6 +97,12 @@ function nodequeue_schema() {
         'size' => 'tiny',
         'default' => 1,
       ),
+      'publish_only' => array(
+        'description' => '',
+        'type' => 'int',
+        'size' => 'tiny',
+        'default' => 0,
+      ),
     ), // fields
     'primary key' => array('qid'),
     'unique keys' => array(
@@ -440,3 +446,16 @@ function nodequeue_update_7203() {
   variable_set('menu_rebuild_needed', TRUE);
   drupal_set_message(t('The menus will now be rebuilt.'));
 }
+
+/**
+ * Inserting a 'publish_only' field to show only published node in Autocomplete.
+ */
+function nodequeue_update_7204() {
+  $name_field = array(
+    'description' => '',
+    'type' => 'int',
+    'size' => 'tiny',
+    'default' => 0,
+  );
+  db_add_field('nodequeue_queue', 'publish_only', $name_field);
+}
diff --git a/nodequeue.module b/nodequeue.module
index 9ca2f25..d362f56 100644
--- a/nodequeue.module
+++ b/nodequeue.module
@@ -1005,6 +1005,7 @@ function nodequeue_save(&$queue) {
     'i18n' => $queue->i18n,
     'reverse' => $queue->reverse,
     'insert_at_front' => $queue->insert_at_front,
+    'publish_only' => $queue->publish_only,
     'reference' => $queue->reference,
   );
 
@@ -1212,6 +1213,16 @@ function nodequeue_queue_add($queue_name, $nid = NULL) {
  * @throws Exception
  */
 function nodequeue_subqueue_add($queue, &$subqueue, $nid = NULL) {
+  if ($queue->publish_only) {
+    $node_status = db_select('node', 'n')
+      ->fields('n', array('status'))
+      ->condition('n.nid', $nid)
+      ->execute()
+      ->fetchField();
+    if (!$node_status) {
+      return;
+    }
+  }
   if (!empty($nid)) {
     $transaction = db_transaction();
     try {
@@ -2016,13 +2027,17 @@ function nodequeue_api_autocomplete($queue, $subqueue, $string) {
 
   $query = db_select('node', 'n')
     ->addTag('node_access')
-    ->fields('n', array('nid', 'tnid', 'title'))
+    ->fields('n', array('nid', 'tnid', 'title', 'status'))
     ->range(0, variable_get('nodequeue_autocomplete_limit', 10));
 
   if (!empty($queue->types)) {
     $query->condition('n.type', $queue->types, 'IN');
   }
 
+  if (!empty($queue->publish_only)) {
+    $query->condition('n.status', 1);
+  }
+
   global $user;
   if (!user_access('administer nodes', $user)) {
     $query->condition(db_or()->condition('n.status', 1)->condition('n.uid', $user->uid));
diff --git a/tests/nodequeue.test b/tests/nodequeue.test
index 4a12ee2..c71e8a1 100644
--- a/tests/nodequeue.test
+++ b/tests/nodequeue.test
@@ -55,7 +55,7 @@ class NodequeueWebTestCase extends DrupalWebTestCase {
    * @internal param int $rid
    *   The role ID allowed to manipulate this queue.
    */
-  function createNodequeue($types, $rids = array(2), $size = 10, $reverse = FALSE, $owner = 'nodequeue') {
+  function createNodequeue($types, $rids = array(2), $size = 10, $reverse = FALSE, $owner = 'nodequeue', $publish_only = 0) {
     $queue = new stdClass();
 
     $queue->title           = $this->randomName();
@@ -77,6 +77,7 @@ class NodequeueWebTestCase extends DrupalWebTestCase {
     $queue->new             = TRUE;
     $queue->insert_at_front = 0;
     $queue->reverse         = 0;
+    $queue->publish_only    = $publish_only;
 
     $qid = nodequeue_save($queue);
 
@@ -211,6 +212,16 @@ class NodequeueManipulateTestCase extends NodequeueWebTestCase {
     //$this->drupalGet('node/'. $node->nid);
     //$this->assertNoRaw('nodequeue">Nodequeue</a>', t('Nodequeue tab is not present on node page.'), t('Nodequeue'));
   }
+  function testNodequeuePublishOnly() {
+    // create and populate a nodequeue
+    $queue = $this->createNodequeue(array('page', 'article'), array(2), 6, FALSE, 'nodequeue', 1);
+
+    // create a new node and add it to the queue using the 'add to queue' link
+    // in the table on the nodequeue tab.
+    $node = $this->drupalCreateNode(array('type' => 'article', 'status' => NODE_NOT_PUBLISHED));
+    $this->drupalGet('node/'. $node->nid .'/nodequeue');
+    $this->assertText('Only published nodes allowed', t('"Only published nodes allowed" text is present.'), t('Nodequeue'));
+  }
 }
 
 class NodequeueManipulateAllTestCase extends NodequeueWebTestCase {
