Custom Fields
Support MB Relationships Show data from related post/term after selection

This topic contains 2 replies, has 2 voices, and was last updated by  brandonjp 3 days, 2 hours ago.

  • Creator
  • #16442


    I’m trying to create a display on an Admin Edit Post form that will show meta from a relational field after the related post/term is selected.

    Is there a built-in way to do this?

    If not, Any tips on creating this? (I’m guessing I’ll use JS to make a custom request to get the data and populate a Custom HTML MB field)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #16457

    Anh Tran


    Do you mean showing the data dynamically, based on the user selection of related posts/terms? If yes, then I think you’ll have to do that your way with JS + custom HTML field.



    I ended up accomplishing this using a Custom HTML field & a little PHP and JS.

    If anyone else ends up needing direction on this, here are a few links. This is not a drop-in solution for you but hopefully helps get you started.

    PHP to handle an incoming AJAX request for term metadata & return JSON:

    JS to fetch the taxonomy term metadata and place it into the page:

    Add Custom HTML field with html to support the incoming term metadata (I also give it a custom class):

    After selecting a taxonomy it populates the Custom HTML like so:

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.