Skip Navigation

[Resolved] Search for parents within a cred form

This support ticket is created 7 years 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
- 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 5 replies, has 2 voices.

Last updated by Luo Yang 7 years ago.

Assisted by: Luo Yang.

Author
Posts
#588087

I am trying to create a gig guide. I will set up venues with children which are events which also have children which are artists. I know how to do this.

I would like users to be able to add events and specify the venue and artists appearing. I want them to choose from lists of the parent venues and child artists but I need them to be able to search these and create new ones if a venue and/or artist does not exist.

In addition an event may have multiple artists (children) which will need to be searched/selected. Is this possible?

Thanks

#588377

Dear Nick,

In your case, it needs at least three custom post types:
A) venue
B) event
C) artist

(1) one "event" post can connect to multiple "artist" posts, one "artist" post can connect to multiple "event" posts, so it should be many-to-many relationships, I suggest you setup many-to-many relationships between post type "event" and "artist", see our document:
Creating and Displaying Many-to-Many Post Relationships
https://toolset.com/documentation/user-guides/many-to-many-post-relationship/
Then when you edit a "event" post, you will be able to setup related existed "artist" posts without creating them, and in the single "event" post, you can display those related "artist" posts with a view.

(2) Post type "venue" and "event", if one "event" post can connect only one "venue" post, then you can setup "event" as child post type of "venue" post, if one "event" post can connect multiple "venue" posts, same as (1), you can try with Many-to-Many Post Relationship.

#588571

Thanks . I undersea nd how to relate posts to each other. My main question is how to allow a user to create an event and search for venues and artists to relate to the event (over time a dropdown will become too long and cumbeesome) within a CRED form.

#589009

There isn't such a built-in feature within CRED form, if you agree, we can take it as a feature request.

#589819

Yes please. Specifically the feature request is to allow the user to, within a form, search for a parent (or child) and choose one or create a new one. The benefit is that this will result in users not creating duplicate parent or child entries for the same entity.

Thanks

#590045

Thanks for the comment, I forward it to our developers, but there isn't any ETA for it, I suggest you subscribe to our blog to get the updated news:
https://toolset.com/blog/