Skip Navigation

[Resolved] How do I display a group of fields only to Administrators?

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by Minesh 6 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#1099021

I have a form where people will submit applications.. These will be reviewed and evaluated by user with the Administrator role..

I want to make a block of the fields only visible to Administrators..

Based on the page at https://toolset.com/documentation/user-guides/cred-conditional-display-engine/ I tested using the following code within the form's body..

[cred_show_group if="(USER(‘role’) eq ‘administrator’)"]
HelloooOO Administrator!!
[/cred_show_group]

But it's not working..

Where did I go wrong?

Thanks

#1099245

Ohh I found that I can use the GUI buttons to build what I needed. So that is resolved 🙂

But I'm still curious to know why my code above didn't work though, since it's in the documentation..

Thanks

#1099323

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - it looks like there is issue with the single quotes.

Could you please try to use following code and try to resolve your issue. Following code works for me just fine.

[cred_show_group if="( USER('role') eq 'administrator' )"  mode='fade-slide']
HelloooOO Administrator!!
[/cred_show_group]