On this support page for creating a custom CreateInputOptionPage, they suggest storing the values of the page by just assigning them to a variable. It\'s not clear however W
Using a global variable to store the reference to the custom page is the correct and the easiest way.
Related question: Inno Setup: Access to custom control from OnClick event of another control.
Though it's questionable whether you really need to store the user value to another variable. Just read the value from the custom page at the moment you need it.
Using global variables in indeed frowned upon, in general. But that's, when you are developing a standalone code. In this case, you are just implementing event hooks for an existing application, so you have no other choice.
The only other way is to recursively lookup the custom page in child controls of the WizardForm
. It's lot of code and quite inefficient.
See my answer to Inno Setup: OnHover event for an example of recursive component iteration.