Skip Navigation

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

This support ticket is created hace 6 años, 3 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por Minesh hace 6 años, 3 meses.

Asistido por: Minesh.

Autor
Mensajes
#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

Idiomas: Inglés (English )

Zona horaria: 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]