oTree Forum >

Run method on waitpage arrival

#1 by FredLau97

Hey,

I was wondering if there is any way to run a pieace of code, whenever a user enters a waitpage in oTree?
Something similar to before_next_page or after_all_players_arrive, but runs instead as soon as someone arrives on the waitpage?

Best,
Frederik

#2 by davidlucius

Hi Frederik,

The is_displayed method is executed as soon as a user reaches a page and is also available on waiting pages. You can put your code in there. But be careful: If the user refreshes the page, is_displayed (and therefore your code) gets re-executed.

Best,
David

Write a reply

Set forum username