Tet banner

Custom Fields
Support General display related field meta on backend

  • Creator
  • #28172
    Resolved @mindspark

    Hi -

    I'm building a version of a scheduling app and I am using a total of 4 CPTs...

    1. Events => related to Venues reciprocal, Assignments reciprocal
    2. Venues => related to Events reciprocal, Assignments reciprocal
    3. Employees (both a CPT and User Role) => related to Events reciprocal, Assignments reciprocal
    4. Assignments (all other CPTs relate here) => this is where I want to build the schedule of Employees for Events

    My question is:

    If I add post fields for Events, how can I pull the rest of the custom meta associated with Events into the Assignments form?

    We will have dozens of Events available to pick from for each schedule, so I'm hoping that when I select an Event, that the related info dynamically populates into the form. And then if I add a second Post field for Employees, I want to create records that associate an Employee with a given Event.

    I don't see a way to do that in the Post field settings, and I don't see instructions in the KB.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #28188
    Long Nguyen


    The field type post only helps you to select the post and save its ID to the database. It does not help to populate the field value of that post. Your case needs a lot of code to do that, you can follow the series Hotel Booking for more information https://metabox.io/series/hotel-booking/. Or create your own field type https://docs.metabox.io/custom-field-type/.


    Excellent idea to create a custom field type!

    thanks for the article on Hotel Booking. I'll check it out.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.