Problem: I have 2 post types in a many-to-many relationship. In a form that creates custom post type #1, I would like to be able to choose 3 items from CPT #2 to relate to the new post.
Solution: It's not currently possible to manage M-2-M relationships in a new post Form or an edit post Form. The best way to manage M2M relationships is to use Relationship Forms. You can also use generic fields and custom code with our PHP APIs.
Relevant Documentation:
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_get_related_posts
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
https://toolset.com/documentation/user-guides/front-end-forms/inserting-generic-fields-into-forms/
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 |
---|---|---|---|---|---|---|
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 2 replies, has 2 voices.
Last updated by 5 years, 1 month ago.
Assisted by: Christian Cox.