Skip Navigation

[Resolved] Get parent post meta before post

This support ticket is created 7 years, 11 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Author
Posts
#393008

I have an interesting problem I need help to solve.

I have a CPT Message which has custom fields populated with the email addresses of the conversation participants. I use these to determine who should receive email notifications of new messages.

Now, to create a reply to a message, I have another CPT Reply. Users use a CRED form to create the reply as a child of the message.

I want to populate two CF's in the reply with the data in the parent message so that I can send notifications of the reply to both conversation participants.

The problem is that, since the reply post is not yet posted, it does not know its parent, so I cannot populate the fields with the id="$message" parameter.

How do I populate CF's in a cred form with data from the post which IS GOING TO BE its parent once posted?

#393109

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pamela,

Thank you for contacting our support forum.

Unfortunately this one is not possible. The reason is that you cannot get the information from a Parent post that does not yet exist.

What I mean by this is that the information for the parent is not present in the database so programmatically speaking you are not able to call for data that is not stored.

The parent information needs to be stored before you can retrieve it in the child post.

Thanks,
Shane

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