Skip Navigation

[Resolved] Can I populate a form with a post type(s) with a certain custom field value?

This support ticket is created 4 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.

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 4 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#1540019

Tell us what you are trying to do?
I need to provide a drop down in a form with the titles from custom post types that have a specific value. I have a post type called "Team Members" and I need to provide a drop down with a list of those Team Members that have the custom field value of "level" that is equal to "f".

If I can get really greedy, is it possible to filter out custom post types with 2 specified values? Something like custom post type "Team Member" where "level" = "f" as mentioned above and "game-id" = "XXX" where "game-id" could be passed via URL to the form view (assuming "game-id" had previously been assigned to the post as a repeating custom field)?

Is this something Toolset can do?

Is there any documentation that you are following?
I couldn't find anything on custom post types with specific field values.

Is there a similar example that we can see?

What is the link to your site?

#1540501

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

There is no native feature available but there is a workaround.

- You should create a view that produces the JSON array of key: values, view offers the way to create list with separators you can use that method. https://toolset.com/documentation/user-guides/views/view-layouts-101/#list-with-separators
- Please check the related ticket => https://toolset.com/forums/topic/dynamically-populate-select-field-2/#post-525640
- you can add the generic select field and assign your view's shortcode as options as shown with the above related ticket.

More info:
=> https://toolset.com/documentation/user-guides/front-end-forms/inserting-generic-fields-into-forms/