Hello,
What I’m trying to do is open a modal window on page load when a particular ACF data type is present. If ACF data type Emergency is set I want to output a modal window (see attached png in secret note) with Emergency details and open that by default. I have tried to cannibalize another modal and set some custom id and class names then trigger the modal on load with :
document.addEventListener('DOMContentLoaded',()=>{ alert('yep'); window.xToggleUpdate('emergency-event-modal', true); });
It isn’t working but I think this is close. The short code that dumps the modal markup with emergency details is working. I just need to launch that modal on pageload.