Passing values between different Forms is simple. You can create a Module that has global variables, and import it in different Forms. Changing a global variable in one Form makes it available in another.
In this example app there are two different pages, each of which is a different Form. There’s a counter on each Form to display the number of times the user has clicked a link.
This is achieved in a module named
Global, which has a variable named
number_of_clicks. In each Link’s click handler,
number_of_clicks is incremented. The
Global module can be imported into each Form, which allows the
number_of_clicks to be displayed in a Label.