Skip to content

Conversation

@daggerhart
Copy link
Contributor

@daggerhart daggerhart commented Nov 12, 2017

Fixes #1035 and #348. Possibly related to #712 and others.

Changes proposed in this pull request

  • Pass the group boolean into cmb.elReplacements so it can know which index to replace for new Name and new IDs.

    • If the new replacements are for a group, use a regex that won't match a field's attributes.
    • If the new replacements are not for a group, use a regex that finds matches at the end of the field attribute strings, avoiding the group-level values within those attributes.
  • When a new group is added, fix the name and ID attributes on the hidden .empty-rows so that the next "Add Row" has the correct attributes.

@daggerhart daggerhart changed the title fixing regex renaming of field name and ids Fix repeating fields within repeating groups by changing regex depending on context Nov 12, 2017
@jtsternberg jtsternberg merged commit 866bdf0 into CMB2:trunk Nov 13, 2017
@jtsternberg
Copy link
Member

Nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants