I am currently working on a feature for my website that allows guests to contact listing owners for more information. I have two types of users on my site: Designers and Partners, both of whom have listings.
To facilitate this, I have created a Custom Post Type (CPT) called 'Contact' and established a one-to-many relationship with the 'Designers' CPT. However, I am encountering difficulties in setting up the form to send the message to the correct listing owner.
When I create a form for the 'Contact' CPT and set the message to go to the listing owner, it seems to be directed to the 'Contact' list owner instead. To address this, I attempted to use a connection form, but I am unable to find an option to notify the actual listing owner.
Could you please provide detailed instructions on how to create a 'Contact Listing Owner' form that sends the message to the correct listing owner? I would like to implement this feature for both 'Designers' and 'Partners' listings.
Thank you for your assistance. I look forward to your guidance.
Hello. Thank you for contacting the Toolset support.
Can you please confirm where you added the form? Did you added the form on the single post of your listing post type so every single post of listing post type will have the contact form?
So I am not sure what from to add to where? That is issue. Initially I created a regular Post Form for a CPT called "Contact" and made it so that the the listing owner of that CPT (Contact) would get the notification when someone filled out the form, then i put it on the Designer CPT Listing Template (the single page, so that every page had the form, and updated the access so that guests could access it). But then I realized that since the form that I created was built on its own CPT "Contact" and not "Designers" I figured that it would not work when someone filled out the form since the form owner in that case was the form owner of the "contact" CPT not the Designer. I didn't even test it out because i figured it would not work that way.
So then I tried creating a One to Many connection between the Designers and The Contact with the One being the Designer and the Contact being the many. At that point I wasn't sure how to proceed.... so i tried creating a new relationship form between the Desinger and the Contacts. But at that point i was lost as i cold not find any notification settings to notify the listing owner like there were on the regular post forms.
So my question is, what is the proper way to set up a contact listing owner form? So I can do it. It seems like this is a major feature and there should be a tutorial on it. right?
The proper way is you can create one to many post relationship between the post type Designer (one) and Contact (many).
Then you also followed the correct step that you will have to add the contact form on the single post content template of the post type Designer. Make sure you added and configured the email notification for your form on form submit.
Then what we will do is, you can use the Toolset form's hook "cred_notification_recipients" to send email notification to parent post author. In your case, send notification to designer post's author.