Skip Navigation

[Resolved] form with 2 relationships

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 3 replies, has 1 voice.

Last updated by Minesh 3 weeks, 1 day ago.

Assisted by: Minesh.

Author
Posts
#2801098

Hi
I have 3 CPT Movie, Client, Delivery.
Relationship 1-to-many: Movie-Delivery
Many-to Many: Delivery-Client

In the form to create a new Delivery I can add only 1 relationship link to my movie. However I need to add the relationship to the client. Which I do with a "Post-Reference". I need a solution to add 2 relationships instead 1 relationship and 1 post-reference.

Is there a way maybe to use the post-reference as a selection of a relationship that would be updated when saving the post "delivery" ? Meaning that when saving the post, the post-reference would be transformed in a relationship ?

#2801100

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I'm afraid that its not possible.

As you already know you can manage one to many post relationship with your form and for many to many post relationship you will require another form that is post-relationship forms.

Please check the following Doc:
- https://toolset.com/course-lesson/front-end-relationship-forms-for-connecting-posts/

#2801103

How is the post-reference registered ? Isn't it an ID reference that could be used to update the 2nd relationship with cred-save script ?
What is the reason of this limitation ?

#2801109

Minesh
Supporter

Languages: English (English )

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

Here is the Doc that shows how you can use and register post reference field:
- https://toolset.com/course-lesson/using-post-reference-field-to-set-up-one-to-many-relationships/

One to many and many-to-many are different relationships where with many-to-many post relationship you can add intermediary post fields and it will have intermediary post type that seats between the post type A and B. Many to many post relationship will look like post type A {intermediary post type with custom fields if exists} post type B.

Please check the following Doc:
- https://toolset.com/course-lesson/many-to-many-post-relationships/#setting-up-many-to-many-post-relationships