I know there is a "relationship form" but my goal is to create a post and to associate a relationship to another post in one form.
I can not associate relationships between posts on the front end through standard forms. Is there a way around that?
Hello,
For one-to-one and one-to-many relationships, you can embed the relationship field into the post form, see our document:
https://toolset.com/documentation/post-relationships/selecting-parent-posts-using-forms-create-child-items/
For the many-to-many relationship, you will need to use relationship form, since there will be intermediate post involved in this case, see our document:
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/
There isn't other way around for many-to-many relationship.
Maybe I can explain a scenario and you could tell me to best how to proceed. I have Service Providers I would like to add. Our Real estate agents are the ones doing it (from the front end). Our many service providers can work in many cities. (Many-to-Many). From what you described, there's no way for my agent to add a service provider and say they work in these "6" cities (aside from using cities as a clickable taxonomy (the reason i'm not doing that is I need the filterable relationship on the front end when searching)
Is it possible then to put the relationship form (M2M as a checkbox) and to place the relationship forms in a single page with one submit button.
My hope would be a form to add a service provider (post form) and to connect that provider to a Service area (m2m relationship) and to a service category (m2m relationship)
or would you need 3 submit buttons for each form
I assume we are talking about many-to-many relationship between post types "Service Providers" and "cities".
As I mentioned above, for M2M relationship, you will need to follow our document to setup the relationship form and connect "Service Providers" post with other "cities" posts:
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/
It is not possible to embed one HTML form into another HTML form, this is a limitation of HTML
hidden link
"Every form must be enclosed within a FORM element. There can be several forms in a single document, but the FORM element can't be nested."