Skip Navigation

[Resolved] Simple lookup form field

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 6 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#622326

Hi,

Want to have a select drop diwn on a dirm which lists all users of the site that have a certain role (eg author).

I have searched a lot and cannot see the answer. I am nit talking about listibg itger CPT fyi

Thanks
Steve

#622463

Dear Steve,

There isn't such a built-in feature within Types plugin, but you can setup a custom select field, and use Types filter hook "wpt_field_options" to populate the options with user names and user IDs, see similar thread here:
https://toolset.com/forums/topic/relating-users-to-custom-post-types-to-pull-user-field-info-into-a-view/#post-268551

To the users of specific user role:
https://codex.wordpress.org/Function_Reference/get_users
role__in - Limit the returned users that have one of the specified roles

For your reference.

The forum ‘Types Community Support’ is closed to new topics and replies.