Hello!! I have a field with optional answers and text notes that are shown or not depending on
the answers marked.
The following code works fine but I need that when the optional field has nothing marked (it is blank) no note is displayed and I don't know how to add that without breaking my code.
thank you
function showHideNote() {
console.log(fd.field('FormaJuridica').value);
if(fd.field('FormaJuridica').value =='Persona Física'){
$('.OcultarMostrar2').hide();
$('.OcultarMostrar').show();
}
else {
$('.OcultarMostrar').hide();
$('.OcultarMostrar2').show();
}
}
fd.rendered(function () {
$('.OcultarMostrar').hide();
$('.OcultarMostrar2').hide();
//сalling the function on form load
showHideNote();
//Call the function when the field value changes
fd.field('FormaJuridica').$on('change', showHideNote);
});