How it works...

In step 3, we extended our JavaScript to include the loadEvent function as the only method to manually wire up on the load event of the form. The function programmatically wires up the populateWithTodaysDate function to fire during the OnChange event of the Supervisor field.

We then proceeded to remove the existing manual function call in step 6 to step 8 (if we had already wired it previously), and then we introduced the loadEvent function as the only function called during the form's OnLoad event in step 9 and step 10.

As mentioned in the introduction, this pattern ensures that all the necessary setup is done in one location, giving you one place to see all the wired events in case you need to enhance/maintain your extensions. Furthermore, this will simplify your wiring when you have a large number of events to set up.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.111.125