G
Guest
If I call a form as a result of selecting a menu option, is it possible for
the form to pick up on which option it was called from?
I have a form which can be used to enter data into 2 different tables
(Certificate and Category), and it has add/edit/delete buttons. I want the
form to be able to detect whether the user selected Certificate or Category
in the main menu, and alter the text on the buttons accordingly. I've worked
out a way to do it using a module to define a public variable; the variable
is set by the menu click events and the form can then test the variable and
set button text accordingly. It works, but I don't like it - I don't want to
use public variables, as you're supposed to keep everything as private as
possible. Is there an event raised which the form can detect in order to
determine which menu option as selected?
the form to pick up on which option it was called from?
I have a form which can be used to enter data into 2 different tables
(Certificate and Category), and it has add/edit/delete buttons. I want the
form to be able to detect whether the user selected Certificate or Category
in the main menu, and alter the text on the buttons accordingly. I've worked
out a way to do it using a module to define a public variable; the variable
is set by the menu click events and the form can then test the variable and
set button text accordingly. It works, but I don't like it - I don't want to
use public variables, as you're supposed to keep everything as private as
possible. Is there an event raised which the form can detect in order to
determine which menu option as selected?