I am hoping to get some feedback from the community on a project that I am working on using ACF, but not sure if I am headed in the right direction.
On a daily basis I have to track all the work performed by the contractor and their subcontractors on my projects. Currently I am using an excel spreadsheet, but it has become very time consuming creating my reports this way and searching for data. I am hoping over time if I can get this to work in ACF that I would be able to build off of this project.
Project Setup
I have an Option Page with a list of Contractors and three Custom Post Types for Contract Items, Labor, and Equipment. Here are the structures for the Option Page and CPTs.
Contractor:
Contractor Name (text area) Stores the Contractors Name from the Prime and all the subs on a project.
Contract Items:
Item Number (number)
Item Name (text)
Unit (number)
Price per Unit (number)
Labor:
Contractor (select field, dynamically filled from the CPT Contractor Options Page)
Labor Name (text)
Trade (select field, dynamically filled from the CPT Labor Trades under another Options Page that I have created)
Equipment:
Contractor (select field, dynamically filled from the CPT Contractor Options Page)
EQ ID (number)
Equipment Description (text)
I have created a CPT called Daily Reporting and a field group called Field Report. The Field Report structure looks something like this:
Field Report (Field Group)
– Report Number(Number)
– Report Date (Date Picker)
– Start Time (Number)
– End TIme (Number)
– Weather (Text)
– Item Work Log (Repeater)
– Contract Item Name (Select) *From CPT – Contract Items
– Item Work Description (Wysiwyg Editor)
– Labor (Repeater)
– Contractor (Select) *Option Page Contractor
– Trade (Select) **I want to dynamically show only the trades for the selected Contractor.
– Labor Name (Select) **I want to dynamically show only the labor for the selected Trade and Contractor.
– RT Hours (Number)
– OT Hours (Number)
– Equipment (Repeater)
– Contractor (Select)*Option Page Contractor
– EQ Description (Select) **I want to dynamically show only the Equipment for the selected Contractor.
– EQ ID (Select) ***I want to dynamically show the Equipment ID for the selected Equipment Description.
– RT Hours (Number)
– OT Hours (Number)
– Photo Gallery (Gallery)
I have setup the field reports to force myself to track each item separately with its own description, labor, and equipment. In the future, I would like to be able to pull up a specific Item Work Logs and filter on a date range. This would be very helpful to be able to select the Concrete item and find out who worked on this item during a period of time. Would this be possible the way I have setup this up?
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚨 The 2023 ACF Annual Survey closes tomorrow! This is your last chance to complete the survey and help guide the evolution of ACF. https://t.co/0cgr9ZFOJ5
— Advanced Custom Fields (@wp_acf) May 18, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.