To achieve this, Open Form Editor:
1. Go To “Form Properties” Option.
2. A New Form Open, Click Events Tab.
3. Click on “Add” button from Event Handler Section. Specify the function name to call on selected event. Click Save.
4. Now, click “Edit Library” button from Event Handler Section. Write Your function in the form with the same function name given in the previous step.
5. Click Save and Publish.





