Support

Account

Home Forums General Issues Filtering out post_object field

Unread

Filtering out post_object field

    • markee

    • September 26, 2020 at 5:28 am

    Hello guys. I am really stuck here with this problem, so I was hoping you anyone could help. I do not ask anyone to write code for me, just to point me in the right direction.

    So far, I have one select field and one repeater that has post object inside.

    Select field is currently listing all taxonomy categories, which is good.
    Post object is fetching all posts from database (acf/post_object/query/).

    My goal is to select whatever taxonomy, and then, when I want to add some post, I want to be able to choose only from posts that are ‘from’ that taxonomy, not all posts, since I have too many of them.

    I managed to enqueue admin script, but I can’t get the value of selected field for a first step.

    I think this should be done like this :
    – The moment I select some taxonomy, it triggers function in javascript, make ajax call to retrieve posts with that taxonomy, then populate posts with those posts.

    Is this possible to do it this way or I need some different approach? If so, can someone give me some directions.

    Best regards,
    Mark.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

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.