Skip Navigation

[Resolved] Conditional User Text Field Display

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 1 reply, has 2 voices.

Last updated by Minesh 1 year, 11 months ago.

Assisted by: Minesh.

Author
Posts
#2611211

I have a Custom User Text Field which I need to display conditionally on a page. No reference to it in the documentations though pretty sure I did this in the past.

I want to

If [types usermeta='full-member'][/types] is not empty display a message.

If [types usermeta='full-member'][/types] is empty do not display a message.

How to do? Thanks

#2611221

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

You can use the conditional shortcode to display the conditional content based on the custom user field.

For example:

[wpv-conditional if="( '[types usermeta='full-member' current_user='true'][/types]' eq '' )"]
 this field is empty
[/wpv-conditional]

Here is the related ticket that might help you:
- https://toolset.com/forums/topic/how-to-check-if-userfield-is-empty/

More info:
- https://toolset.com/documentation/legacy-features/views-plugin/checking-fields-and-other-elements-for-emptynon-empty-values/