1. Go to form property, click on add button,
3. For example, we want to fill the textbox on load and save recode on change of Payment_Status filed. So we create one function auto_save.
A. FillData() : On form load some text will show in assign filed.
B. Auto_save() : On change of “XXXX” filed recode will save.
4. Web resource added.
5. Now we need to add our both function.
A. Filldata() : on load event.
B. AutoSave() : on change event, here we attach our auto_save function to “Payment Status” filed.
On Change event is attached on some specific field. So we need to specify the field name and mention the function names. In large projects we have so many fields and it’s very difficult to identify which function is attachde with which filed.
To reduce this overhead we need a little bit of change in our coding style.
1. Add two functions in our script.
2. Need to add only OnLoad event. And all controls regarding to Onchange event write in script in attachEvents(). From this way of code increase the readability.