I am trying to:
I have a docs post type and a partner post type with a many to many relationship set up.
I want to add a selector on a cred form to allow someone to pick the partner from a doc cred form. I have this working fine in a one to many post type for another relationship using...
<div class ="field"> [cred_field field='@source-content-to-source-ticket.parent' select_text='--- not set ---' class='form-control' output='bootstrap']</div>
I have it kind of working but it just too odd having two forms on one page. This is the same functionality I want but it puts things in another form instead of just a field on the current form...
[cred-relationship-form form='add-partner-to-source-doc' parent_item='$current']
So what is the code I need to get this in the same form - and when I choose either post type I get nothing under relationships when I need to choose a field.
Hello,
The parent selector of Toolset form works only for the one-to-many relationship, it does not work for many-to-many relationship, if you agree, we can take it as a feature request.
For many-to-many relationship, we have provided "relationship form", with it you can connect existed posts:
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/
Toolset allows you to create forms to connect posts that form a many-to-many relationship
For your reference.
Please keep this open as a feature request. We are using the many to one selector in a few places and it looks and works great.
For some of our stuff having two forms on a page isn't a huge deal and we can make it work but there are a couple of forms that this "field" belongs in the middle of the form and it is kind of goofy having it at the top of the page. Yes I know I can nest forms but I have had browser issues nesting forms before and layering that with your API doesn't sound like a good idea.
As your request, I have marked this thread as a feature request, and assign it to correspond supporter.
We have this request filed already, I made it public here so it can be upvoted:
Note that we cannot go above what is possible in the backend (means, for example, a post always must be first saved, before it can be connected to some other posts)
https://toolset.com/feature-request/?wpv_post_search=Many+To+Many+Connections&wpv-wpcf-plugins=CRED&wpv_view_count=686737
Thanks for your voice on the request, please do not forget to upvote it.
Thank you - I voted.
Just thinking today this is actually a bigger use problem than I originally thought. We added the form to our edit forms for the admin team. Not a huge huge deal to have them hit submit twice... they don't want to but will live with it.
But there is no solution for a "New Post". If a user fills out a form that uses relationships as a field they cannot add that to their form until they have already saved their form which creates basically an unusable UX on the front end.