Hi:
I'm trying in a master/detail grid-edit or grid-add to hide fields in a card, if I choose a value in a select. (url PartesDiariosList?action=gridedit)
I have this code in Client-side events of the field, in order I got it in every row of the grid (v2024)
{ // keys = event types, values = handler functions
"change": function(e) {
// Your code
;
switch ($(this).val()) {
case "U":
console.log('fired')
$("#r_proyecto").hide();
break;
default:
$("#r_proyecto").show();
break;
}
}
}
But nothing happens. I'm trying to inspect the code to get the appropriate element to hide, but I can't find it (r_proyecto doesn't exist, I've tried with o_proyecto too)
This is the source code of one card:
<div class="row partes_diarios_observaciones">
<label class="col-sm-2 col-form-label ew-label">Observaciones</label>
<div class="col-sm-10"><div>
<input type="text" name="x3_observaciones" id="x3_observaciones" data-table="partes_diarios" data-field="x_observaciones" value="" size="30" maxlength="255" placeholder="Observaciones" data-format-pattern="" class="form-control">
<div class="invalid-feedback"></div>
<input type="hidden" data-table="partes_diarios" data-field="x_observaciones" data-hidden="1" data-old name="o3_observaciones" id="o3_observaciones" value="">
</div></div>
</div>
Thanks in advance