Read Only Drop Down Field for User, Edit for Admin

johnspartan

New Member
I apologize if this has been covered in the forums somewhere, I couldn't find what I was looking for.

I cannot seem to get a dbjoin dropdown element to be read only for users, but editable for admins - how can I accomplish this?

Again, I apologize if I missed this in the forum, any help would be greatly appreciated! Thanks to all who have made Fabrik possible, this is an awesome component!
 
It should be as simple as setting the access options for that element. Set "Form View" to admin and "Details View" to your users.
 
Thanks for the reply!

I tried that, however, the users need access to that element on the form. It seems the problem lies in the filtering of the dropdown. The results that are shown are filtered to show the user only their entries, I would like to have the admin see them all regardless of the user.
 
Ah, okay. I get what you're saying now. Use the "Joins where and/or order by" and apply it to the Users group, assuming the Admin group isn't a child of the Users group. That should allow Admins to access everything but run the "WHERE" condition on Users.
 
I apologize for the n00bness, where would I apply that? Also, seems I borked something as users now see the details page when going to the form link. Admins can see the standard form...:confused:

This is added to the forum URL for users but not admins: /details/1/
 
Additionally this error is shown for users who attempt to access the form:

Notice

Sorry, but you are not authorised to add this record
 
Yeah, that'll take you to the details and not the form. Trying to go to a form when you don't have edit access will take you to the details (I think), so it may be an access level thing. The "Joins where and/or order by" is on the second tab of the dbjoin element options, where you select db table.
 
Just set all the form's elements to public and still getting the error. Set the same public permissions on all the related form's elements as well. I even deleted the Joomla! menu link and recreated it, same issue now.
 
Form is public, list is public. The user can see the list just fine. That's what I'm confused about lol I appreciate the help

EDIT: I reset the list's permissions (just click on the current settings and hit save) and the user can now see the form as normal
 
Use the "Joins where and/or order by" and apply it to the Users group, assuming the Admin group isn't a child of the Users group. That should allow Admins to access everything but run the "WHERE" condition on Users.

Ok, now that I have the form up and running... On the element's data tab, I just set the "Apply where to" setting to Special?
 
No, you want to apply the where condition to your users, so whatever user group you want to apply it to, that's what you select.
 
"where owner_id={$my->id}" I think (with owner_id being the field of the table that tells who owns that record). The problem is if you apply it to registered users, it'll apply to Admins as well.
 
I got ya. This goes along with another post I have in reference to a similar issue. I've got another dbjoin element that shows records to a user to input into the form, and the records are filtered to the specific user using
Code:
WHERE {thistable}.client = {$my->id}
The problem I am having with that is when an admin edits the record, those elements are erased because of that filtering statement.

Will the above do the same thing in this case?
 
UPDATE

So for some unknown reason, setting the element's access level to Special accomplished what I was after - kinda. The element is not displayed on the form, which is close enough. What's strange about this is that I tried that in the very beginning and it was a no-go. I'm not sure what changed.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top