Skip Navigation

[Resolved] Use user custom fields for conditional output

This support ticket is created 7 years, 11 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

Author
Posts
#402546

I am trying to: Use custom user fields created with Types for conditional output in CRED.

I've created a user cred form where users are allowed to edit their own data.
I want to display a "you are not allowed to.. etc..." message instead of the form for some users.
I have a user custom field "Disable adit own user data" (checkbox)

Now I want to use that in the cred user form to show the message, but "Conditional output" only shows options for Type Fields related to post/pages, not custom user fields.

Is it possible to make Conditional output > Conditions to evaluate > Data origin > Type Fileds to also show Custom User Fields.

Thanks

#402664
183.JPG

Dear jaime,

I can not duplicate same problem, see screenshot 183.JPG

Please check these:
1) You are using the latest version of Types + CRED plugins
2) Your CRED form is for editing/Creating wordpress user

#402759

Hi Yang,

Yes I can get that also on "Conditional Groups", I know that, but I'm talking about "Conditional output". The behavior is completly different.

#402947

I suggest you try with Views shortcode [wpv-conditional] to check if the custom user field "Disable adit own user data" value, then output the message or CRED form, and you can use the Types shortcode in the if attribute, see our document:
Using shortcodes in conditions
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/

#403476

Ok, thanks, perfect. I was confused about not seen the user fields among all others.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.