248 Posts
Giuse
6 years ago
6
Topic

I tried to use the Joomla JForm User field and while in backend it works, in front end it works just for the superadmin, lower level users cannot use it (no button to open the window to select a user). I also tried to grant all permissions to registered users in Seblod options but nothing changes. Is it a bug or there is another option to make it work for non-super admin?

thanks

Giuse

Get a Book for SEBLOD
4229 Posts
Kadministrator
6 years ago
5
Level 1

JForm fields are meant for backend, they have only limited usefulness on frontend due to hardcoded permissions checks like this on the joomla side.

248 Posts
Giuse
6 years ago
4
Level 2

Understood but.. it's a pity: for example I have user fields where in backend the administrator chooses the user with JForm for those fields, in front end the same fields are set with a live value to current user but does not work, since being in Front End the field is permission restricted so neither the live value can be set...

I know I can duplicate the field for front-end (than having to change references to dependent fields...) but I was looking for a more efficient alternative: the permissions are hardcoded so only option is hacking (that I don't like), correct?

thanks

Giuse

4229 Posts
Kadministrator
6 years ago
1
Level 3

Usually one can use select dynamic instead of jform fields, it's just a matter of querying the right table.

248 Posts
Giuse
6 years ago
0
Level 4

Yes, I can use select dynamic field but this field loads ALL items existing in the table into the dropdown list on browser (so in a big site it's not the best option) while JForm is very smart and opens a dedicated window where you can query and select the value.

I will open a github feature request to enable the field in front end also.

thanks

Giuse

4229 Posts
Kadministrator
6 years ago
1
Level 3

You would need to hack Joomla core as this is hardcoded there, Seblod functions just as an wrapper to show this fields (JForm is one of core Joomla classes to display Joomla form fields)

248 Posts
Giuse
6 years ago
0
Level 4

You are right, Klas: Seblod code retrieves the instance of the form with JForm::getInstance and then invokes getInput: the result of this call to Joomla contains or does not contain the code for the modal window depending on current user.

Thanks

Giuse

Get a VIP membership