Merge pull request #896 from SergeyKhval/issue880

Fix #880, hidden inputs are not wrapped with form-group
This commit is contained in:
Kevin Ross 2016-02-29 10:30:00 -05:00
commit 36eb7c55a9

View File

@ -114,7 +114,7 @@
// Requires form-group standard markup (will add it if necessary) // Requires form-group standard markup (will add it if necessary)
var $formGroup = $input.closest(".form-group"); // note that form-group may be grandparent in the case of an input-group var $formGroup = $input.closest(".form-group"); // note that form-group may be grandparent in the case of an input-group
if ($formGroup.length === 0) { if ($formGroup.length === 0 && $input.attr('type') !== "hidden" && !$input.attr('hidden')) {
$input.wrap("<div class='form-group'></div>"); $input.wrap("<div class='form-group'></div>");
$formGroup = $input.closest(".form-group"); // find node after attached (otherwise additional attachments don't work) $formGroup = $input.closest(".form-group"); // find node after attached (otherwise additional attachments don't work)
} }