Hey champs,
I have a form page with a submission button that updates a collection.
On another page (on an external screen) I’m displaying the form input, however this page is not reloading upon form submission.
Is there a way to refresh the display page or a certain element on this page ?
Do you mean that both pages (Wix pages) are open at the same time (on different browser tabs/different devices), and you want an event that occurs on 1 of them will trigger the re-loading of the other one?
@edwardfrogz basically you can add code to the page 2 that queries the database every
x seconds (using setInterval() ) and if there’s a form submission, then refresh the page using wixLocation.to(wixLocation.url).
But maybe there’re better solutions.
@jonatandor35 I’m using this implementation at the moment, I was hoping there is a more intelligent way to do this rather that a static interval timer.
Or at least using the suggested method just on a single element in the page rather than reloading the whole page.
@edwardfrogz I don’t know what exactly you’re trying to achieve. But of course you can refresh a dataset on the page instead of refreshing the whole page.