Hide/Show fields base on condition
Posted: 2019-10-11 23:15
Hello
I am using latest version of AppGini 5.80
I am trying the code below to hide/show field base on condition
when I enter this code, it is not work
$j(function(){
$j('#selectionner-container').on('change', function(){
if($j('#selectionner').val() == 'GESTION DU PERSONNEL'){
$j('#periode').parents('.form-group').hide();
}else{
$j('#periode').parents('.form-group').show();
};
});
});
but when I enter like this, it is work. It seems the first condition is not working. Any idea please.
$j(function(){
$j('#selectionner-container').on('change', function(){
if($j('#selectionner').val() == 'GESTION DU PERSONNEL'){
$j('#periode').parents('.form-group').hide();
}else{
$j('#periode').parents('.form-group').hide();
};
});
});
even if I enter the code like this, it hide the field
$j(function(){
$j('#selectionner-container').on('change', function(){
if($j('#selectionner').val() == 'GESTION DU PERSONNEL'){
$j('#periode').parents('.form-group').show();
}else{
$j('#periode').parents('.form-group').hide();
};
});
});
Thank you
I am using latest version of AppGini 5.80
I am trying the code below to hide/show field base on condition
when I enter this code, it is not work
$j(function(){
$j('#selectionner-container').on('change', function(){
if($j('#selectionner').val() == 'GESTION DU PERSONNEL'){
$j('#periode').parents('.form-group').hide();
}else{
$j('#periode').parents('.form-group').show();
};
});
});
but when I enter like this, it is work. It seems the first condition is not working. Any idea please.
$j(function(){
$j('#selectionner-container').on('change', function(){
if($j('#selectionner').val() == 'GESTION DU PERSONNEL'){
$j('#periode').parents('.form-group').hide();
}else{
$j('#periode').parents('.form-group').hide();
};
});
});
even if I enter the code like this, it hide the field
$j(function(){
$j('#selectionner-container').on('change', function(){
if($j('#selectionner').val() == 'GESTION DU PERSONNEL'){
$j('#periode').parents('.form-group').show();
}else{
$j('#periode').parents('.form-group').hide();
};
});
});
Thank you