Support

Account

Forum Replies Created

  • Hi John

    I think what I trying to do is something along the lines of a SQL innner join.

    I have a custom field in the ‘listing’ post from which I can pull an array of event IDs (all of whom related to that listing.)

    I’m trying to use that array to filter out unrelated events when the user fills out a booking form on the front end (where the user is choosing an event to book for.

    The upshot is that user’s list of choices for selecting an event to book for, are limited to the events related to the listing the user is looking at.

    One way of expressing it is that I’m trying to filter the child to choose a parent from multiple parents, all of whom have a single grandparent. So my filter has to omit all choices of parents who are not the children of a particular grandparent.

    Doe that make sense?

  • .. and again with the correct zip file attached 🙂

  • Hi John

    Thankyou for getting back to me. I have read tons of your ACF work and use a couple of your plugins. I’m very grateful to you for posting a reply.

    Yes that is exactly what I’m trying to do; and are well in over my head! I’ve attached a JPG which probably explains it better. The area in blue is the parent “listing” post. In green are related viewing appointment times: “events.” In orange is an ACF form with a “booking” post. Within the booking post in purple is a related “events” field. Purple is supposed to allow the user to choose from the available event times (as seen in green). Purple currently lists all booking times posted for all events.

    At the top you can see a shortcode return: 207 is the ID of the listing (Blue) and the array 3515,4562 are the events times (green). I cannot seem to get the array loaded in the ACF [acf/fields/post_object/query/] filter. The post ID (207) comes back empty when in called inside the filter.

    I’ve tried using a global var to save the ID but this also seems to zero out.

    I’m beyond the limits of my present knowledge on how to fix this.

    Some other files also attached which you can take credit for and use as you see fit 🙂

Viewing 3 posts - 1 through 3 (of 3 total)