Skip Navigation

[Resolved] Create post from other post or have multi relationships

This support ticket is created 5 years, 12 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#1212104

Good day

I am trying to make a system with toolset for Fault reporting.

So the post I have is the following.

Vehicles
Owners
Faults
Fault-Reports

One to many relationships are as follow.

One Owner to many Vehicles
One Yacht to many faults
One Fault-Report to many Faults

What I am trying to create is that I can create the Fault Reports in the front end with the post forms.

So I need to set the vehicle, which the get the owners details from the relationship.

I then want to select the faults that are for the vehicle that is not fixed, and a taxonomy, i.e. warranty or customer related damage. It can be a relationship or a separate post. The report have to show the fault's featured photo.

I am migrating my system from MS-Access where this is a very easy thing to do. Yet, I have not find anything that will be able to do this with wordpress. I tried searching for an invoice system type that are created with toolset, but all of them are either vague or no used in my current situation. Is it possible to do what I want to do with Toolset?

Any help or advice how to do this will be mostly appreciated.

#1212335

Hi,
In a single Toolset Form, you can perform one of these tasks:
Create a new parent post
Edit an existing parent post
Create a new child post and link it to an existing parent post
Edit a child post and optionally change the existing parent post

It sounds like you want to create a Fault Report post and select multiple child Faults in the same Form, and at the same time select the grandparent Vehicle post. All these features are not currently possible in a single Form without some custom code. Here's what is possible in the current system:
- Separate from the Form, create a search View of Vehicles so you can find the Vehicle you want to report on
- Include in the results a link to create a child post for this Vehicle. This link will redirect you to a Form where you will create a Fault Report for this Vehicle. Assign your taxonomy here.
- Save the Fault Report post and redirect to the single Fault Report page. Show a list of outstanding Faults for the grandparent Vehicle here. In the View of Faults, include a simple Form in each row of results. The Form will include only a "Submit" button, but it will effectively set the parent Fault Report of that Fault when you submit the Form. Then the page will refresh, the Fault you selected will appear in a list of related Faults along with its picture, and you can continue adding other Faults in this same manner.

Let me know if you have questions about this.