Skip Navigation

[Resolved] How to show grandparent post custom field in email on child post submission?

This support ticket is created 2 years, 7 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: Africa/Casablanca (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by himanshuS 2 years, 7 months ago.

Assisted by: Jamal.

Author
Posts
#2153431

I have three post types ---
1) Company
2) Jobs
3) Job Applications

I want to send an email to the user on application submission using CRED. I am able to include information about the parent post using the relationship item attribute but I am not sure how to show grandparent field (Company Name).

Is there a way to do this in CRED form using the fields and views, and placeholders features?

#2153807

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello and thank you for contacting Toolset support.

Well, you can create a custom placeholder that will return the grandparent data. Use the toolset_get_related_post function twice to get the grandparent.
- https://toolset.com/documentation/programmer-reference/forms/how-to-use-custom-placeholders-in-cred-notifications/
- https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_get_related_post

Without custom coding, you will need to use content templates and pass the item attribute to it(Job). And inside of the content template, you will display the parent(Company) post name. Does it make sense?

#2154933

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.