Apr21Written by:EThuongmai Support
4/21/2007 9:00 PM 
As users are becoming more familiar with Enterprise Forms more and more complex forms are being created. From Enterprise Forms v3.0 we have included a number of Javascipt API to allow easy access of form objects for advanced field validation and calculations etc. Thus it is vitial that EF provide a set of API functions to allow advanced users to obtain the object reference to the field elements for data manipulation and processing.
The following list some of the most commonly used API functions available for used within the form.
- __EFGetElementByEFFieldName(fieldname) : this function takes in a parameter which is the name of the field and returns an object reference to the field. If the field name does not exists a null value is returned. Example var obj = __EFGetElementByEFFieldName('myTextbox');
- __EFGetElementByID(id) : Similar to the above function, this function takes in a paramter which is the 34 characters IS of the form element and returns the object reference to the field if exists. If the object does not exists a null value is returned. Example var obj = __EFGetElementByID('IDxxxxxxxxxxxxxxxxxxxxxxxxxxx');
- __EFGetFieldValueFromObject(obj1) : this function returns a numeric value of the object. If the value or content of the object does not contain a valid numberic value 0 is returned. This function can be used for labels, dropdown or select list and textbox objects. Example: var obj = __EFGetElementByEFFieldName('myTextbox'); val = __EFGetFieldValueFromObject(obj);
Tags: