By metricbits - Tue Nov 27, 2018 10:41 pm
- Tue Nov 27, 2018 10:41 pm
#819724
Hi,
I have JavaScript in my form taht looks like this
I have JavaScript in my form taht looks like this
Code: Select all
It is used to show and hide certain fields based on selections made on the form. However, when i use this form as a sub-form in another Dynaform, it doesn't work because value doesn't change and sub-form is read only. What adjustment to the code i must do to solve this issue?$("#new_replacement_drop").setOnchange(function(newValue, oldValue) {
if (newValue === "New") {
$('#current_salary').hide();
$('#current_salary').disableValidation();
$('#replacement_grid').hide();
$('#budget_grid').hide();
$('#new_forecast_grid').show();
$('#new_budget_grid').show();
}
else {
$('#current_salary').show();
$('#replacement_grid').show();
$('#budget_grid').show();
$('#new_forecast_grid').hide();
$('#new_budget_grid').hide();
}
});