Hide items in detail view for anonymous user

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
smurphy
Posts: 3
Joined: 2022-10-05 09:12

Hide items in detail view for anonymous user

Post by smurphy » 2022-10-05 15:08

Hello, Group-

I am using AppGini to collect appointment requests for a medical facility. I have it set so anonymous users (patients) can submit a form using the detail view, and will embed that form on the medical practice website. The medical staff will have admin access so they can collect the information and contact the patient. I would like the medical staff to be able to view all of the detail view information, but I'd like to hide a couple of items from the anonymous users, namely the header and the timestamp field.

TLDR: I need to hide a field and the header in the Detail View for anonymous users only?

Thanks,
Summer

peebee
AppGini Super Hero
AppGini Super Hero
Posts: 352
Joined: 2013-03-21 04:37

Re: Hide items in detail view for anonymous user

Post by peebee » 2022-10-06 23:24

To hide fields from non-Admins you can try this:

viewtopic.php?f=7&t=4708&p=19248&hilit= ... iew#p19248

With reference to "header", I gather you are meaning the navbar (.navbar)?

You could try adding this as well in between the <script> tags mentioned in the link above:

$j('.navbar').hide();

smurphy
Posts: 3
Joined: 2022-10-05 09:12

Re: Hide items in detail view for anonymous user

Post by smurphy » 2022-10-07 14:42

Perfect! Thanks so much for the reply - worked like a charm. The office staff are not in the Admin group, and I didn't want to exclude them from seeing all of the fields or hide the navbar from them, so I changed the code it to check if the member was in the anonymous group and that did the trick. I've been researching this for several days now, so I really appreciate your taking time to help me out. Thanks.

Post Reply