Update Bricks Query Loop on Post Creation

Hi guys, have you had any success updating or reloading the Bricks Builder Query based on custom events?

I am basically building a Client Portal with Tickets right now.
I’ve already implemented ACF Relationships for the Tickets and Comments.
I am using a custom CPT for the comments called “Ticket-Comments” that get assigned to the ticket by a custom metafield (_belongs_to_ticket → post_id of ticket it belongs to).

When a user submits a Ticket Comment, the comment gets created automatically using Bricksforge Pro Forms.

What i’d need now is to check if a new post of the post type ticket-comments is created for the current ticket (single post page). If so → the Bricks Query that fetches the comments should get updated/reloaded (or better: just load the new comments and append them to the tree).

I can’t use websockets on my hosting, and i do not want to use longpulling for various reasons. is there a way to do this (performantly) with custom PHP/JS ?
Thanks in advance!

I’m also interested in a solution for this and wanted to bring some visibility to the topic.

We’re facing a similar challenge where we aim to dynamically display wishlist items in a modal. Reloading the entire page to reflect the added entries isn’t an ideal approach.

It would be great if there was a way to create an interaction within Bricks Builder to specifically target and refresh the relevant query without needing a full page reload.

2 Likes

Hi Vakuya, i am currently testing things out with HTMX. Maybe this helps you also to get on the right track. I’ve recently watched a video by theo and thought about giving it a try. Still very very very basic testing but i got toast notifications working and next i am going to get back into the Query Loading topic by just surpassing the query as a whole ;D.

Video for inspo: https://www.youtube.com/watch?v=0rtpsJSLb44

1 Like