I have a one(Product) to many(Work) relationship.
On the Product page I have created form on front end allowing user to connect their works, also displaying related work at the same page.
Now users would need to disconnect the relationship, either via a delete link, or via another form, how do I do that?
Example page is here
hidden link
I've looking at this thread however feels very confusing.
https://toolset.com/forums/topic/front-end-editing-of-post-relationships/
Thank you.
Hi,
Thank you for contacting us and I'd be happy to assist.
To delete a post-relationship, you can use the "cred-delete-relationship" shortcode, inside the loop of the view, that shows the related posts, in the template for the single "Product" pages:
https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred-delete-relationship
Example:
[cred-delete-relationship role_items='$fromViews' relationship='relationship-slug' redirect='self']Delete this relationship[/cred-delete-relationship]
Note: You'll replace the 'relationship-slug' with the actual slug of the relationship in use.
I hope this helps and please let me know if you need further assistance.
regards,
Waqar