Skip Navigation

[Resolved] Is there a way to embed the form in the actual Advisor page rather than having to go to another page?

This thread is resolved. Here is a description of the problem and solution.

Problem:

Is there a way to embed the child post form in the parent post rather than having to go to another page?

Solution:

You can use shortcode [wpv-post-id item="$current_page"] as the relationship field default value.

Relevant Documentation:

https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/

This support ticket is created 2 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by WilliamM1564 2 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2318177

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?

#2318181
default-value.jpg

Hello,

In single "Advisor" post, you can get current Advisor post ID with shortcode:
[wpv-post-id item="$current_page"]
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/
$current_page is used to retrieve data from the current page being rendered.

Then edit the post form "Add Testimonial", use above shortcode as default value of relationship field, see my screenshot

#2318207

Thank you for creating a new thread for me.

I am sorry, I am confused. I do see how to pull the advisor post id and I see how to edit the form with that data.

I don't see how to embed the form in the Divi Advisor template. Would I create a Content Template with the form inside?

Thank you so much again.

#2318221

You can use Toolset Forms shortcode [cred_form] to display the post form in where you want:
https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_form

#2318225

My issue is resolved now. Thank you!