OnChange for LookUp Field
Posted: 2022-08-10 19:55
Hi everyone, I have tried to use jsetzers code but I am not understanding fully. I have 2 select2 lookup fields
What I want is if someone changes the contract field on edit/update then the calue of the Codes field is set to empty.
This is what I have so far, but its not working, no error messages either.
can anyone point me in the right direction?
What I want is if someone changes the contract field on edit/update then the calue of the Codes field is set to empty.
This is what I have so far, but its not working, no error messages either.
can anyone point me in the right direction?
Code: Select all
var dv = AppGiniHelper.DV;
dv.ready(onReady);
function onReady() {
type_id_init();
}
function type_id_init() {
var fieldname = "Contract";
var field = new AppGiniField(fieldname);
// register onChangeHandler (listener)
field.onChange(onTypeIdChanged);
}
function onTypeIdChanged() {
hideOrShowFields();
}
function hideOrShowFields() {
// fade in common fields
$j('#Codes').val('');
}