Regarding https://toolset.com/forums/topic/remove-post-relationship-instead-of-deleting-post/#post-1134091
I want to know how to create a list of children (loop) with a disconnect relationship button for each one of the children.
This must be done from the frontend
Hello,
I assume we are talking about one-to-many relationship, if it is, it is possible with a post form for editing child post.
For example, in a single parent post, you can create a post view, query child post, filter by the one-to-many relationship, and display below post form.
Create a post form for editing child post, display the post type relationship field, for example:
[cred_field field="@RELATIONSHIP-SLUG.parent" class="form-control" output="bootstrap" select_text="--- not set ---" value='0']
in that field there is a Fork button, with it you can disconnect the relationship.
If you don't want user to see the relationship field, you can setup CSS codes to hide above relationship field, and add a hidden field like this:
<input type="hidden" name="@RELATIONSHIP-SLUG.parent" value="">
This should be able to remove the relationship too.
Thanks Luo, I forgot to specify that the case described it is a M2M relationship. Is there a way to do achieve thst? Thanks
Unfortunately, there isn't such kind of built-in feature for M2M relationships, if you agree, we can take it as a feature request, our developers will evaluate it.
Sure Luo, I think toolset has a great potencial but it is missing some features in relationships and maps. If you give me an email where I can write some suggestions it will be great. Next week I'm finishing a website and probably it is a good example to show how someone with really limited PHP skills can develop a full functional website/mobile app from scratch.
I'm very happy about the product. Congratulations to the whole development/support and the rest of the toolset team.
My issue is resolved now. Thank you!