Hello,
I'm hoping to get some help in understanding how to execute what we need. Below is explanation of what we're trying to achieve with our Toolset Post Types/Fields. I think I need to use the Post Relationships, but I don't know how to actually tie everything together.
WHAT WE NEED:
We have two post types, Houses and Vendors. On the Houses Post Form (create and edit) we need a field to select multiple Vendors – and Vendors can be assigned to multiple Homes.
For example:
House A --- Vendor 4, Vendor 3
House B --- Vendor 2, Vendor 1
House C ---- Vendor 1, Vendor 3
Vendors will not need to select houses. So I only need the multi-select field for the House Post Form.
I'm at a loss on how to have the Vendor CPTs show as a multi-select field on the Post Form and be able to select/assign those per house. Your help is appreciated. Thank you!
Hi, thank you for the resources. I have reviewed them but am still having a lot of trouble getting this to work as we need, and understanding what order of steps to take.
I've created a Post Relationship between my Vendors and Houses (see screenshot below) and set it to Many-to-Many Relationship.
I've gone into my existing Custom Fields for HOUSES and added the "Post Reference" field. I selected Vendors for the Post Reference (because we need users to assign Vendors to their House).
Since users need the option to select multiple Vendors I assume I need to convert the field to be "Repeatable". But when I try to set it to repeat it shows a message saying I need to convert/setup the relationship to "many-to-many"– even though I thought I already did this.
So I click the button in the message popup to make the change. But after it's done my new field disappears. I go back in and try the steps all over again, but the field continues to show the same message and then disappears when I try to set it up. I CANNOT set it to be repeatable at all.
Can you help me understand how to set the field to be repeatable, so that our users can select multiple options?
I appreciate your help. Thanks!
Hi thee,
please do not add a post reference field and just use the relationship for many to many mode:
https://toolset.com/course-lesson/many-to-many-post-relationships/
After that you can use the method below to create a form that includes the connection between the two:
https://toolset.com/course-lesson/front-end-relationship-forms-for-connecting-posts/
So basically you connect the post themselves and not a field of them.
Hope it helps
Hello,
After reviewing the specific resources shared above, it sounds like it is NOT possible to achieve what we specifically need. Please correct me if I'm wrong. But the resources indicate that we would be making a seperate/new form in order to select related items.
We are looking for a way to add a new field for "selecting multiple related CPTs" to our EXISTING Front-End Post form - not through a separate form. Our users need to be able to assign Vendors (a CPT) to their House (a CPT). Using the Front-End Post Create Form and Post Edit Form that we've already created.
When I used the Post Reference Field instructions, it worked partially. I was able to add this new field to our existing Front-End Post Form and users were able to select a Vendor (CPT) from the dropdown. But this method only allowed users to select one (1) option and we need to allow them to select many options.
Am I misunderstanding or is there in fact a way to add this new Relationship form as a field to our existing Front-End Post Form?
Thank you.
Hi there,
I see what you mean now. Your assumption is correct and you can not select multiple items in the form.
The reason: with many-to-many relations, you will have an intermediary post type where you can assign custom fields.
So let's say you have 1 parent and to that, you want to assign two children (so with many-to-man you will have an intermediary post type that holds custom fields) Toolset does not know which custom field value should be for those two children.
So unfortunately they answer is no.
Thank you.