Skip Navigation

[Resolved] Split: How to delete the relationship from the view

This support ticket is created 3 years, 5 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.

Our next available supporter will start replying to tickets in about 0.40 hours from now. Thank you for your understanding.

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/Karachi (GMT+05:00)

Author
Posts
#2103095

Thanks, as I understand I can still come around the limitations. Your idea is similar to what I use at the moment. Works so far:

- I have created a view for the nfc-chips and added relationship forms which works fine.
- I can now create relationships for the nfc-chips and connect them to the vcards in the frontend.

Unfortunately, toolset does not yet have an option to "edit" a relationship. Only to edit the metadata attached to a relationship. Therefore, I need to disconnect a relationship to be able to assign them to a different vcard.

Still, when I insert a "delete relationship shortcode" in the view for the nfc-chips nothing is rendered.

    [cred-delete-relationship role_items='$fromViews' relationship='profil-nfc-chip']Delete this relationship[/cred-delete-relationship]

See this link: hidden link

(I have renamed the vcard cpt to profile cpt)

#2103103

I found a solution in this post: https://toolset.com/forums/topic/i-am-trying-to-delete-the-relationship-using-this-code/

Had to create a child view with a "Query Filter" set to "Filter by post relationship or repeatable fields group owner" and select "items in the 'Profile NFC-Chips' relationship" as related items of "The current post in the loop".

Also I needed a "Post status filter" to "Select posts with status of publish or draft."

Still the linked documentation in the mentioned post is missing. https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/editing-existing-connections-between-related-posts/#deleting-existing-connections-between-posts

The shortcode "cred-delete-relationship" is rather complicated to use and not documentation available afaik.