How can I perform actions such as on page load in preview mode?

Sorry for the question, which for many people should be simple.

I want to load a default value into a variable using a workflow on the current page through the On Page Load event. I would like to know how I can execute functions and actions in preview mode. When I click on preview with an On Page Load action activated, will it be executed?

Best!

Hi @wilsonfe
Indeed, switching to the Preview mode doesn’t trigger the on page load event.
To trigger it, you can either refresh the page (which will refresh the Editor), or manually trigger the workflow by going to the workflow edit page and clicking on the Test button!

Thanks!