Hi I have created a members site where the members can post their own linked(URL) videos to a single watch page. When a new item is saved into the database (either by a member or an admin) I would like the new item to show on the page without having to manually refresh the page every few minutes.
How do I do this?
Hi.
You need to add an afterInsert data hook to your database collection then use it in frontend code to refresh your dataset.
You can see a sample implementation of a data hook here .
Good luck!
Thank you.
I am still a tad confused, newbie to code. I want to be able to insert the data into the database and then when I update an item it appears on the site without the viewer having to refresh.
Would an afterUpdate work better, also what code would I need to insert onto the data.js and the page.
Can you give an example of this please. It’s way too vague to be a clear answer.
@robin25113 Please add your own issue into a new post instead of bumping up an old post. Explain what you are trying to do, what works, and what doesn’t. Also, add any code in a code block as stated in the Forum Guidelines .
This is an old post and is being closed.