I have a mod_form which displays following information.
I would like if the user changes the value of 'use default module code' to YES, the value of the Module code is automatically reset to the default value, which is pulled up from the default values. I have tried everything, but nothing seems to work. somehow, it is automatically pulling up the recent value entered into the database.
In the above case, the default value is CS118-15, but because CS119 is the latest one entered, it forces the module code to be populated with the latest value entered by the user which was CS119 which should only appear if the value of the toggle box is NO