My site has the ability for anyone (without logging in) to post an advert. They include their email address on the custom post (Matrimony). Other visitors can make inquiries on this advert however we would like to keep the email the address of the parent poster a secret. I have created a child post called Matrimony Inquiries and a CRED form for it.
I want a notification to be sent to the Parent posters email address when the inquiry form has been completed. I have the Child form working correctly (it brings the Post Title automatically). I can't figure out the second part to create the notification itself to the parent poster (the email is in a custom field called "Submitter Email").
I have tried to add this to a hidden generic text field (as described in other articles) but this returns as empty
[cred_generic_field field="_wpcf-e-mail-id" type="email" class="" urlparam=""]
{
"required":0,
"validate_format":0,
"persist":1,
"default":"[types field='@submitter-email.parent' output='raw'][/types]"
}
[/cred_generic_field]
In contrast this is filled in on the child form
[cred_field field='@matrimony-matrimony-inquiry.parent' class='form-control' output='bootstrap' select_text='--- not set ---' required='true' order='ID']
I have also reviewed the content at https://toolset.com/forums/topic/send-cred-notification-to-email-from-parent-post-custom-field/
and made the view with the following modification. I have the same problem as per the post above. If I remove the view the field is available and if I insert the view it dissapears.
[cred_generic_field field="_wpcf-e-mail-id" type="email" class="" urlparam=""]
{
"required":0,
"validate_format":0,
"persist":1,
"default":"[wpv-view name="listmatrimonyemail"]"
}
[/cred_generic_field]
Ensure that Disable the wrapping DIV around the View is enabled.