Tell us what you are trying to do?
I am trying to create an Add Testimonial form to create a Testimonial for a specific advisor. I would like to display the form at the bottom of the Advisor template.
For the moment, I am trying to create the form correctly. I see I can add a field for the Advisor / Testimonial relationship, but I would rather have the testimonial attach automatically to the current advisor.
Is there any documentation that you are following?
No.
Is there a similar example that we can see?
I want the option to add a testimonial for an advisor from the Advisor's page (custom post type).
What is the link to your site?
hidden link
Hello,
How do you setup the post type relationship between post types "Advisor" and "Testimonial"?
If it is one-to-many relationship, you can follow our document to setup the child post form:
https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/
section "Creating Forms with a Parent Post Preselected"
It is one-to-many. That is one Advisor to many testimonials.
I see how this would work if I were not using Divi for the content template for Advisors, but I am using the Theme Builder in Divi.
How do I create a form like this and call it up in Divi?
You can use Toolset shortcodes in Divi builders, for example, create a content template with classic editor, setup the child form link with toolset shortcode, copy/paste the toolset shortcode into Divi builder, it should be same workflow.
Since I don't have a Divi theme copy in my localhost, if you need more assistance for it, please provide a test site with the same problem, I can setup a demo for you.
I can login into your website, will update here if find anything
Yes, you are right, you need to put the child post form in a page.
I have setup a demo in your website:
1) Create a new page "Create child Testimonial post":
hidden link
Display the post form "Add Testimonial "
2) Edit the content template "Template for Advisors":
hidden link
Insert a Toolset Fields and Text block, and get the child form link shortcode:
<p>[cred_child_link_form form='597' text='Create new Testimonial' target='_self']</p>
You can use above shortcode into Divi builder to display the child form link, and use custom CSS codes to hide the parent select in "Add Testimonial" post form
Oh! Now I get why we had to put the form in a page, because it actually comes up in another page. I thought we were embedding the form in the Advisor template.
Is there a way to embed the form in the actual Advisor page rather than having to go to another page?
My issue is resolved now. Thank you!