Open opetrone opened 10 years ago
Check, your code is invalid. You did not define function.
PhoneType: {
title: 'Phone type',
options: function(data) {
if (data.source == 'list') {
//Return url all options for optimization.
return '/Demo/GetPhoneTypes.php?UserType=0';
}
//This code runs when user opens edit/create form to create combobox.
//data.source == 'edit' || data.source == 'create'
return '/Demo/GetPhoneTypes.php?UserType=' + data.record.UserType;
}
}
Also, COD_ISTAT_PROV is not set in dependsOn.
If I pass a function to options the dropdown menu don't work (no ajax request launched if I pass a url).
Example:
FIELD: { title: 'Comune', dependsOn: 'FIELD_TOP', if (data.source == 'list') { return 'action/comuni.php?province=?provincia=0'; } return 'action/comuni.php?province=?provincia=' + data.dependedValues.COD_ISTAT_PROV; } },