Hi,
We have a form successfully adding new custom post type with a relationship to another content type item. We'd like the CRED form to pass the value of the relationship in the email notification we have set up - is that possible?
This is the Expert code for the field we're trying to share in the email confirmation:
<label>Performance date</label>
[cred_field field='@sita-performance_sita-ticket.parent' class='form-control' output='bootstrap' select_text='--- not set ---' urlparam='performance']
Any guidance is much appreciated. Thank you
Hi, you can use the Fields and Views button above the email notification editor to insert a Post Title shortcode (or any similar shortcode) in your email contents. In the popup, you can use the "Post Selection" tab to choose "A post related to the current post, set by a Types relationship". See the attachment here. You will select the parent post in your one-to-many relationship to display the selected parent post in the email notification.
Interestingly I was able to add the Title of the related item using your instructions but wasn't able to use the GUI interface to add the custom field I was using. I had limited "Post selection" options, with nothing regarding relationships available.
BUT I was able to trick things into working by manually changing my field from this:
[types field='performance-date' style='text' format='F j, Y'][/types]
to this:
[types field='performance-date' style='text' format='F j, Y' item="@sita-performance_sita-ticket.parent"][/types]
I just mimicked the code from the Title field that was working.
Thanks you!