in reply to [Solved]: How to perform different actions before and after submit button is clicked.
Thank you NetWallah for your response as well. Updating subject to mark resolved.