g_form.addOption triggering onChange Client Script

kani1
Kilo Contributor

i have an onChange client script to do some stuff when value on the formfield is changed. Since this field is populated dynamically, every time addOption is executed, Onchange client script gets executed as well.

So, When I change a value on the form, it is understandable to call onChange. Why is it calling OnChange event even when value is not changed, just that values are populated. Anyone has come across this issue?

6 REPLIES 6

I have 5 fields on the form



1) SVC Category


2) SVC Tier 1


3) SVC Tier 2


4) Cause Category


5) Cause



SVC Category will have values and other fields are empty. When SVC Category is selected, On change client script will populate SVC Tier 1; SVC Tier 2, Cause Category and Cause will be empty;



When SVC Tier1 is selected, SVC Tier 2 and Cause category are populated. Cause will be empty at this time.



When Cause category is selected, cause is loaded with values from there user can select.



Above all, since these fields are dynamically added, I need to maintain the values and list during onload for existing records.


Looks like you need to maintain multiple client scripts in particular order as per your requirement. Sorry I can't help you more on this.