Skip Navigation

[Resolved] Creating a custom post type for Quotations

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/Karachi (GMT+05:00)

Schermata 2022-11-25 alle 20.10.29.png

Dear team,

we need to create a custom post type in relationship one to one with another custom post type.
We are building a website related to house renovation.
we have custom post type "house" and we want to attach a renovation estimate to the house.
The custom post type is called: House renovation Estimate.
It must be filled on a frontend form where user must select the house to be attached to the Renovation Estimate.

In our mind the Estimate is simple and we would like to create it like this:

General section title (i.e. Electrical) - could not be a field but just part of the template
select field (i.e. doorbell system, stove/dryer, lights) + price field (cost of the selected work)
+ Add another electrical work

(Heating and Cooling)
select field + price field
+ Add another Heating and Cooling work

select field + price field
+ Add another Interior work

and so on...

Can you point me on a solution to do this?
we explored repeatable groups but it is not very useful because for every repeatable group you must select which post is the parent post and it is not good to select the parent post on every section of the estimate.

see attachment for something similar to what we would like to achieve.



Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)


Thank you for contacting us and I'd be happy to assist.

Based on the requirements that you've shared, here is the structure that I'll recommend:

1. You'll have the custom post type "House renovation Estimate" which will be in a one-to-many relationship with the main post type "House".

Note: A better name for this custom post type would be "House Renovation Estimate Item", as each post in this will represent a single expense item and not all the records.

2. There will be two custom taxonomies, attached to this post type:

a). Type
This taxonomy will hold options/terms for the main categories of expense types, for example, "Electrical", "Plumbing", "Fees" etc.

b). Renovation Item
This taxonomy will hold options/terms for the actual individual expense items, for example, "doorbell system", "stove/dryer", "lights" etc.

Using taxonomy for this will make it easy for the user to select from the pre-entered options, rather than having to enter all options manually. And user can always add more terms to this, in case a relevant one doesn't already exist.

3. You can then add two number-type custom fields to this post type, one for the lower-cost price range and the other for the upper-cost price range.

Through this structure, it will be easy to add and maintain a record of each expense item, related to an individual house, through the front-end form.

I hope this helps and please let me know if you need any further assistance with this.