-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
The cloned template/row that is being created duplicates ids. To address this, you can do the following,
// Disable all form elements inside the row template
$(container).children(self.settings.template).hide().find(':input').each(function() {
$(this).prop('disabled', true);
$(this).prop('id', '_' + this.id); // <------------------------ add this line
});
// Enable all form elements inside the row template
$(row_template).find(':input').each(function() {
$(this).prop('disabled', false);
$(this).prop('id', this.id.substr(this.id.indexOf('_') + 1)); // <--------------------- add this line
});
No more duplicate ids 😄
Metadata
Metadata
Assignees
Labels
No labels