diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js
index 7d34119441003d1b1dd6dc6a5407feb190f21aea..06b0a61d990d62a94dbc61364dde4dd750689d6b 100644
--- a/themes/bootstrap3/js/lightbox.js
+++ b/themes/bootstrap3/js/lightbox.js
@@ -176,6 +176,7 @@ VuFind.lightbox = (function() {
     // Add submit button information
     var submit = $(_clickedButton);
     _clickedButton = null;
+    var buttonData = {'name':name, 'value':1};
     if (submit.length > 0) {
       if (typeof submit.data('lightbox-ignore') !== 'undefined') {
         return true;
@@ -184,9 +185,10 @@ VuFind.lightbox = (function() {
       if (submit.closest(_modal).length > 0) {
         submit.attr('disabled', 'disabled');
       }
-      var name = submit.attr('name') ? submit.attr('name') : 'submit';
-      data.push({'name':name, 'value':submit.attr('value') || 1});
+      buttonData.name = submit.attr('name') || 'submit';
+      buttonData.value = submit.attr('value') || 1;
     }
+    data.push(buttonData);
     // Special handlers
     if ('undefined' !== typeof dataset) {
       // On submit behavior