(SOLVED) Code not working when previewing from dashboard

That’s a good question. I’m not sure if a published site executes differently, but I don’t think so. I’m pretty sure preview is intended to be as accurate as published.