My code is working in preview, but no working when published.

@michaeldiascoach
Well done. Glad i could help you.