From 7534dd69bd4de363f8d291512865726b58690cec Mon Sep 17 00:00:00 2001 From: Matt Teeter Date: Fri, 8 May 2015 09:08:37 -0400 Subject: [PATCH] Added option to append a string to the source's ID and set the ID attribute on the element --- js/bootstrap-combobox.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/bootstrap-combobox.js b/js/bootstrap-combobox.js index af5dc0d..42931f9 100755 --- a/js/bootstrap-combobox.js +++ b/js/bootstrap-combobox.js @@ -97,6 +97,9 @@ , transferAttributes: function() { this.options.placeholder = this.$source.attr('data-placeholder') || this.options.placeholder + if(this.options.appendId !== "undefined") { + this.$element.attr('id', this.$source.attr('id') + this.options.appendId); + } this.$element.attr('placeholder', this.options.placeholder) this.$target.prop('name', this.$source.prop('name')) this.$target.val(this.$source.val())