Skip to content

Commit

Permalink
Subform - Wrong ID generated for the elements of subform when we clic…
Browse files Browse the repository at this point in the history
…k on Plus (+) button to add repeated subform #25387 (#25398)
  • Loading branch information
ankushmaherwal authored and HLeithner committed Jul 2, 2019
1 parent 79de916 commit fea05e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion media/system/js/subform-repeatable-uncompressed.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
for (var i = 0, l = haveName.length; i < l; i++) {
var $el = $(haveName[i]),
name = $el.attr('name'),
id = name.replace(/(\[\]$)/g, '').replace(/(\]\[)/g, '__').replace(/\[/g, '_').replace(/\]/g, ''), // id from name
id = name.replace(/(\[\]$)/g, '').replace(/(\]\[)/g, '__').replace(/\[/g, '_').replace(/\]/g, '').replace(/\W/g, '_'), // id from name
nameNew = name.replace('[' + group + '][', '['+ groupnew +']['), // New name
idNew = id.replace(group, groupnew), // Count new id
countMulti = 0, // count for multiple radio/checkboxes
Expand Down
2 changes: 1 addition & 1 deletion media/system/js/subform-repeatable.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fea05e2

Please sign in to comment.