You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I am trying to create a feature that would allow an Admin to bulk import users from excel file. After the user uploaded the excel file, I want to build the Edit fields for every user in my file. This means calling the UserFields.Edit.cshtml multiple times in the same output. The only problem that I am facing is that the password generator fails because the same html id are used on the same page which is not good. Here are the hard coded ids generatePassword, passwordConfirmationToggle, passwordToggle and copyPassword.
Describe the solution you'd like
We should never hard code fixed ID in views that are used by driver. Instead, we should dynamically generate ID or class name to allow the user to reuse the views if needed like in my case.
Workaround
I override the view in my own theme, but since this view is driver driven, I think it should be robust.
The text was updated successfully, but these errors were encountered:
MikeAlhayek
changed the title
Replace hardcoded HTML ids with generated ID to allow the reuse of UserFields.Edit.cshtml
Replace hard coded HTML ids with generated ID
Oct 1, 2022
As mentioned I am working a module that allows my admin to import multiple users, and when I call the build editor on the User display manager, the listed ids appear more than once.
Is your feature request related to a problem? Please describe.
I am trying to create a feature that would allow an Admin to bulk import users from excel file. After the user uploaded the excel file, I want to build the Edit fields for every user in my file. This means calling the
UserFields.Edit.cshtml
multiple times in the same output. The only problem that I am facing is that the password generator fails because the same html id are used on the same page which is not good. Here are the hard coded idsgeneratePassword
,passwordConfirmationToggle
,passwordToggle
andcopyPassword
.Describe the solution you'd like
We should never hard code fixed ID in views that are used by driver. Instead, we should dynamically generate ID or class name to allow the user to reuse the views if needed like in my case.
Workaround
I override the view in my own theme, but since this view is driver driven, I think it should be robust.
The text was updated successfully, but these errors were encountered: