The Before Page event is triggered each time an end-user navigates to the Page.
Here are a few examples of actions you might perform in a Page's Before Page event:
Create a Form and add a Field called myField. Drag the Field onto the Page and name the Control myFieldControl.
Right-click on the Page in the Pages tab and select Events. Under Before Page, click the button to create a new Script. Name the script setMyField.
Add the following to the new setMyField script:
fields.myField.value = "Hello, world."; controls.myFieldControl.setDisplayOnly(true);
Return to the Form and run it.
Note that myField has been set and myFieldControl is no longer editable.