Skip Navigation

[Resolved] Creating relationship to existing post when using Gravity Forms post creation

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.

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 1 reply, has 2 voices.

Last updated by Luo Yang 3 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#2447857

Good day!

I am using Toolset for creating customs post types.

I use Gravity Forms advanced post creation for adding new posts and it is working perfectly fine.

However, when new post is created, I would need an automatic creation of a relationship between the new post and another, existing one.

Do you have a solution for that?

Thank you in advance,
Juri Krupenski

#2448225

Hello,

After you use Gravity Forms to create new post, you can use specific action API hook of Gravity Forms plugin(you need to check it with Gravity Forms support) to trigger a PHP function.

In this PHP function, use Toolset relationship API function toolset_connect_posts() to connect posts, see our document:
https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts