Skip Navigation

[Resolved] Function to get list of field names and slugs from Field Group

This support ticket is created 5 years, 9 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by catherineR-2 5 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1206546

Is there any function to get a list of all the field names and slugs from a User Field Group I added? The Types API seems to only have methods for displaying fields.

If there is no function, and if the data is stored in the db, can you let me know which tables it is in?

thanks!

#1206626

Hi, it's actually not very straightforward because of how the information is stored. User field groups are stored in the posts table as post type "wp-types-user-group", and the custom fields are stored in the options table as serialized data in an entry called wpcf-usermeta. There is no public API for querying these directly, and I definitely do not recommend manipulating them manually.

As a suggestion, it might be easier and more organized to export information from Toolset > Import / Export > Export Types data. This will give you an organized XML document with those specs included (as well as some other information you can filter out). If there's anything else I can clarify please let me know.

#1206647

Hi, thanks for the reply. I see the data now.

I might use that data, since it's just for a client's admin area, showing them all the user meta_keys they can query on through my plugin.

#1206648

My issue is resolved now. Thank you!