Conditional Field

How possible it is to hide fields in a dropdown list

I have this code in Add/Copy PAge – Startup Script (But Not Works)

$(document).ready(function(){

$(“#r_NPADRE”).hide();
$(“#r_NMADRE”).hide();
$(“#r_NroSSocial”).hide();

var valNoofLeader = $(“#r_TSeguridadSocial”).val();

if (valNoofLeader == “No”) {
$(“#r_NPADRE”).show();
$(“#r_NMADRE”).show();
$(“#r_NroSSocial”).hide();
}
else if (valNoofLeader == “Si”)

{

$(“#r_NroSSocial”).show();
$(“#r_NPADRE”).hide();
$(“#r_NMADRE”).hide();
}
});

Then I tried in a Field “Client side Events” of the each field an nothing happens

{ // keys = event types, values = handler functions
“change”: function(e) {


$(this).fields(“TSeguridadSocial”).visible($(this).val() == “Si”);0
$(“NPadre”).hide();
$(“NMadre”).hide();
}
}

So any suggestion?

orissone wrote:

var valNoofLeader = $(“#r_TSeguridadSocial”).val();

#r_TSeguridadSocial” is a row, not a field, you cannot use .val() on it.

Also, if the field is a lookup field, you need to use “updatedone” event, you may search “updatedone” in this forum.