Skip Navigation

[Résolu] Problem Using Relationship API

This support ticket is created Il y a 3 années et 6 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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: Africa/Casablanca (GMT+01:00)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par julieP Il y a 3 années et 6 mois.

Assisté par: Jamal.

Auteur
Publications
#2071937

I have a cred_generic_field on a form that displays a list of post titles (from a related post type) and saves the post's ID when the form is submitted (if one of the values has been selected). The relationship is one to many, the edit form is for the child post. The original cred relationship field is included on the form and hidden using CSS. In a cred_save_data hook I'm using the toolset_get_related_post function to get the current related post ID and then using the toolset_disconnect_posts function to remove the current relationship. In a cred_submit_complete hook I then get the ID of the post that was selected and use it to create a new (replacement) relationship for the post. However, the old relationship isn't removed and the new one isn't created. Any idea what the problem might be?

#2071961

Hello and thank you for contacting Toolset support.

Well, without more details about it I can't really tell what's the issue. Was this working before or is it your first attempt?

Would you like to reproduce a minimal case in this test site? lien caché

Can you share the custom code that you are using?

#2074837

I took a different approach so not an issue now