121 Posts
deralex
8 years ago
Topic

Hi,

there's a little problem in my site form of the user form and it had worked until upgrading to J! 3.5.1 and S 3.8.1: 

If a user signs up, he has to fill out password and password confirmation. Works.

Editing user details by an admin should work without filling out the password. That doesn't work anymore. The form shows a validation alert.

The field's validation setting is "required".

What's wrong here?

Get a VIP membership
4229 Posts
Kadministrator
8 years ago
1
Level 1

Problem is there is no conditional validation, this is why backend form is meant for admins and frontend for users to edit their own profile.

But you can work around it - create second set of password fields (there are 2)  with the same storages, then set validation on the second instance as it is done in admin form. Then put usergroup restriction on the fields, set for the first set to admin usergroup and Invert to yes (so that fields will only show when user is not admin), for second set do the same, just set Invert to No. This way non-admin will get fields with required validation and admins without it.

215 Posts
cubist
7 years ago
0
Level 2

Why is it not possible to simply add the LIVE value and let that populate the field when editing?

In fact it even asks for the field even when editing my OWN profile (level = registered)

121 Posts
deralex
8 years ago
0
Level 1

Thank you, Klas! I got it work. 

For everyone else: You need Joomla! ACL Pack. The second pair of fields is only needed when the admin should be able to put in a new password for the user.

What really makes me wonder is that the form did work fine before upgrading...

Get a Book for SEBLOD