Good afternoon,
I'm asking here again because I have a little problem. I will try to explain it in the best way.
I've done some custom content scripts ("Script de contenido personalizado"):
var o = $('input[name="_HIDDENcon_terminal"]').val();
Terminal(o);
--------------------------------------------
function Terminal(tipo){
var term=tipo;
if((tipo=="undefined")||(tipo=="")) term = $('#con_terminal option:selected').val();
var array=["producto", "imei"];
if(term=='No'){
for (var i in array){
$("#_Captcon_" + array[i]).hide();
$("#_Datacon_" + array[i]).hide();
}
}
else{
for (var i in array){
$("#_Captcon_" + array[i]).show();
$("#_Datacon_" + array[i]).show();
}
}
}
These code hides two fields (with its captions) depending on the answer of a 3rd field. When I select "No" on field "Terminal", in a first moment I see it like this:
When I want to edit it, it looks like this:
In theory, I must not be able to see the advanced search box at right. But, when I answer "Yes", and then I also answer "No", it looks like this:
The fields that I want to hide hide.
I also have this code on creation scripts for "producto" and "imei":
Terminal = Values('con_terminal');
Required = false;
if (Terminal == 'si'){
Required = true;
}
And this one on modification script in "Terminal":
Terminal(this.value);
Is there something wrong in my code?
My CRM version is 7.1 SP2.
Thanks in advance