Skip Navigation

[Resolved] I want data from a parent post to be included in a notification mail

This support ticket is created 7 years, 2 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 5 replies, has 2 voices.

Last updated by Luo Yang 7 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#565462

I have a "Match" CPT and a "Quote" CPT.
Match is the parent of Quote.
To create a Quote post i have created a CRED.
That CRED is called from the parent Match.
When the CRED is submitted successfully a notification mail is send.
I want that notification mail to also contain data from the parent post.

I know I can add a link to the parent post, the title etc. But I need specific fields.

Any pointers on where to get started?

Thanks,
Michael

#565469

Dear Michael,

Yes, it is possible within Views shortcode or Types shortcode, please check our document:
Displaying Fields of Parent Pages
https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/

#565483

Hello Luo,

I followed the instructions as shown on the tutorial.
However I cannot get it to work on the notification email that is send.

So I have a Match (in Dutch: Wedstrijden) that is played on a certain date. Someone wants to visit that match and books a trip to it (in Dutch: Offerteaanvragen). The "Offerteaanvragen" is done by a CRED for "Offerteaanvragen" . On sending the form, I want to receive an email with data, including the data of the Match, which is in the parent "Wedstrijden" for which someone did "Offerteaanvragen" .

Any pointers?

#565494

I tested it in my localhost, it works fine.

For example the parent post type "Match" is using slug "match", and the custom field "Offerteaanvragen" is using slug "offerteaanvragen", then you can add below shortcode into the email notification content:
[types field='offerteaanvragen' id='$match'][/types]

Please let me know if you still need assistance for it. thanks

#565501

Hi Luo,

That does not work... This is what I have:

[types field='wedstrijd-datum' style='text' format='j F Y' id='$wedstrijd'][/types]

'wedstrijd' is the slug for Match. 'wedstrijd-datum' is the slug for Match date.
I want to show this in the notification email that is send to me when someone has requested a quote (child) for visiting a match (parent).

Am I missing something?

Thanks,
Michael

#565503

It is abnormal, we need to know if there is any other compatibility problem in your website, please try these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) deactivate other plugins and switch to wordpress default theme, and test again

3) If the problem still persists, please provide a database dump file (ZIP file) of your website in below "private detail box", also point out the problem page URL and CRED form URL, I need to duplicate same problem and debug it in my localhost, thanks