Hi
On form customization page --> Form Properties, there are two things : 1. Form Libraries, 2. Event Handlers
Make sure, you have added your function in Onload event of form in Event Handlers. Also, ensure that event with this function call is enabled.
If you have already done this, try putting an alert inside function call. See if you get any alert.