Refreshing the container to allow multiple instances on the same page

This commit is contained in:
Djamil Legato
2014-09-15 12:45:03 -07:00
parent f1b92502a2
commit 7479aa9b9f
2 changed files with 2 additions and 1 deletions

View File

@@ -10,6 +10,7 @@
},
addField: function (event, element) {
element = $(event.target);
this.container = element.closest('[data-grav-dynfields]');
var div = $('<div class="form-row" />').html(this.layout());
div.insertAfter(element.parent('div'));
},