Hello everyone
I wish when I make a choice in a master table by clicking a radio button, then only a corresponding details tab is displayed and the other hidden.
Tables names
- Master table: “t_stockâ€
- input details table: “t_entreestockâ€
- output details table: “t_sortiestockâ€
The of selection field is named "naturemvtstock".
I put the code in "Client side events" of the Edit Tag of the field "Naturemvtstock"
This is the code that not work yet.
$(document).ready(function() {
$("input[name='x_naturemvtstock']").change(function(){
if ($("input[name='x_ naturemvtstock ']:checked").val() == 'Entrée stock'){
$('[data-table="t_entreestock"]').show();
$('[data-table="t_sortiestock"]').hide();
}
if ($("input[name='x_ naturemvtstock ']:checked").val() == 'Sortie stock'){
$('[data-table="t_entreestock"]').hide();
$('[data-table="t_sortiestock"]').hide();
}
}
}
Thanks to all