The event listener for add record should be submit-form-success-listxx for now, from the latest news I know (though I have to test it - UPDATE = It is indeedsubmit-form-success-listxx listxx being the id/name of your block)
If you have issues to build the correct script, I can do it for you by replying here. If so, would you mind giving me the name of the block where the add record button is?
Also this block is inside a modal? You want to reload the parent page or the child page? (child page being the modal page)
Hi @matthieu_chateau thanks for your reply and offer to help! So I do have it reloading once the add record is submitted. The block and add record are in the same block and on the same page.
window.addEventListener('submit-form-success-requests-list', (e) => {
console.log('add record success', e.detail);
sessionStorage.setItem('scrollPosition', window.scrollY || window.pageYOffset);
// Trigger the page reload
window.location.reload();
});
However itâs not allowing for a delay in load. I tried this and it didnât pause on reload
Hi everyone, sorry to hijack the thread but I have an issue that is related so the experts here may know the answer. The issue is here: Actions based on server time - #2 by Fabio but I also can do the summary here:
Summary â I need to be able to add a custom validation code at the event listener of the update record button such that if my validation fails the user wonât be able to update, the data never gets sent to airtable, and the only option the user has is to cancel.
I think the discussion on this thread gets very close to what I need to do, but doesnât get quite there. Any ideas from the experts?
I Would like a button on my external iframe page to close the modal.
I tried with windows.addEventListener using a custom even dispatched from the iframe page window.dispatch but it doesnât workâŚ
My usecase: When the modal is open, it is updateing a DB and I would like a âCloseâ button to close the modal and refresh the parent page. Right now, it is worning fine with the X icon but I would like to also have a button to close the modal.