// Tell us what you are trying to do?
The comment section in a wordpress blog post functions like what I am about to achieve.
I want to let logged in users leave post reviews using a post form. This shall function similarly to comments where each comment is attached to a certain post after it has been submitted by a page visitor.
Problem:
I created a post type called "reviews" and a post type called "services". Now I want to let users post a review for each service post that exists on my website. But how to achieve this connection through a post form? Normally I would say the post id of the service post has to be saved in a custom field of the review post form. But how to achieve that using Toolset? Or is there a better solution for this problem?
// Is there any documentation that you are following?
I have read the following documenation and it seems to be what I am looking for, but to create a child post link didn't work because I am working with oxygenbuilder templates and that is where the review form should be placed at the end.
Creating Forms with a Parent Post Preselected:
https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/#main-toolset-block-used-in-this-lesson
// What is the link to your site?
hidden link (but it is under construction)
Hi,
Thank you for contacting us and I'd be happy to assist.
You can create a one-to-many relationship between the "services" and "reviews" post type to be able to link one "service" post to many "reviews" posts.
( ref: https://toolset.com/lesson-placement/lesson-placements-1729031-1727251/ )
After that, you'll create a form to "add a new review" post, that will include a field to select the parent "service" post. In that field's default value, you can use the current post ID shortcode "[wpv-post-id]", so that the current "service" post is preselected in that field.
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-id )
Once the form is ready, you can place it in the template used for the single "service" post page, and users will be able to post reviews for individual services.
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
My issue is resolved now. Thank you!