Bug #27080 fix: Incorect id generated for input fields in repetable s… #27081
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug #27080
Summary of Changes
For repetable subform if the name of any field in the subform contains hyphen (-) then the id of the clone is not generated correctly.
If we click on (+) button to add the clone of the subform then the id of the field with hyphen (-) in name do not contain correct number of the clone, instead X is shown in the id.
Testing Instructions
Check the value of id attribute of input element in repetable subform after clicking the plus (+) button to add new clone of sub-form with a field having name hyphen (-) in it.
E.g If we have repetable subform field named as 'office-address' then the id of the elements in the cloned set should be like this 'jform_office_address__office_address1__address' but it is generated as 'jform_office_address__office_addressX__address'
Expected result
The value of id attribute of input element should contain clone number and not X
Actual result
The clone number for the field is not getting replaced with X
Documentation Changes Required
no change required in documentation