Tell us what you are trying to do? I want to be able to get new values from a may-to-may submission form before it is stored. This is similar to the example I quoted below. I can get the new values of the custom fields and one-to-many relationships from $_POST and the old values for custom fields from get_post_meta(). The old value for the related posts from toolset_get_related_post() for both one-to-many and many-to-many but how to I get the values submitted on the many-to-may forms before they are saved in the database.
Is there any documentation that you are following? https://toolset.com/forums/topic/get-new-and-previous-value-before-save-data/
Is there a similar example that we can see? https://toolset.com/forums/topic/get-new-and-previous-value-before-save-data/
What is the link to your site?
Hello, there is no API available for post relationship Forms, so hooks like cred_before_save_data, cred_save_data, and cred_submit_complete do not apply in the case of many-to-many Forms. I'm not sure of a good way to get the IDs of related posts before they are connected in the database because there is no true API for relationship Forms. The post relationships APIs toolset_association_created and toolset_before_association_delete can help you inspect the related post IDs, both before an existing relationship is deleted from the database and also immediately after an association has been created and stored in the database, so you may be able to work with these APIs to achieve something similar. Post Relationships API documentation:
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_association_created
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_before_association_delete
My issue is resolved now. Thank you!