Skip to content

id clash #39

@skwzrd

Description

@skwzrd

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions