I’ve got a custom post type called “Opdracht” (Jobs) and a custom post type called “Offers”. The offer post type acts as a child for the post type “Opdracht”.
A user can submit an offer to a post created in the post type “Opdracht”. This offer is then shown inside the dashboard of the author that created the post inside the post type “Opdracht”.
When an offer is submitted on a post I want the parent author (so the author of the one that created the post inside the post type opdracht) to receive an e-mail that says they’ve received a new offer.
However I cannot seem to get the email address from the parent author. All I can get is the email address from the author that submits the offer.
TL;DR:
Have a parent and child post type called “Opdracht” and “Offer”
User submits an offer to opdracht
When user submits an offer the author of the parent post (opdracht) should receive an email
Can’t grab the emailadress of the parent author so the email cannot be sent through toolset
Hello. Thank you for contacting the Toolset support.
I would like to know here where you added the child form "Offers" that creates new entry for offers - on a single post of parent post Opdracht” (Jobs)?
The form is accessed by clicking a button on the single job(opdracht) page. When clicking the button you're redirected to the form on a seperate page. This form contains the ID of the parent post with the following code: [cred_field field='@opdracht-offer.parent' class='form-control' output='bootstrap' select_text='--- geen opdracht ---' author='$opdracht-offer.parent']
Yes the parent is pre selected when you click on the link of the child form.
The child form doesn't need to be on a seperate page. I could just place it inside a modal on the parent page, would this solve the problem of grabbing the parent authors emailadress?
Actually - the easiest way is, you should try to use the Toolset Form's hook cred_notification_recipients to add as many notification recipients as you want.