Skip Navigation

[Resolved] As user I want to disconnect child/parent relationship without deleting any post

This support ticket is created 6 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by fernandoM-9 6 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#1134095

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

#1134114

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.

#1134130

Thanks Luo, I forgot to specify that the case described it is a M2M relationship. Is there a way to do achieve thst? Thanks

#1134150

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.

#1134181

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.

#1134182

My issue is resolved now. Thank you!