I’ve an field (lookup selecting) with multiple value selecting, how can I disable only a specific value eg:1, 2,3 and not all value?
Row_Rendered
// for idGruppo in all page (add,list ecc…)
$this->idGruppi->Disabled = TRUE;eg:
// for idGruppo in all page (add,list ecc…)
$this->idGruppi->1,2,3->Disabled = TRUE;
I’ve tried with jq in client script but not worksI’ve tried with jq in client script but not works$(function_ () {
$( “#x_Anonimo” ).change();
nckeditor(1);
// disable specific value in options list
$(“x_idGruppi[value=‘1’]”).attr(“disabled”, “disabled”);
$(“x_idGruppi[value=‘2’]”).attr(“disabled”, “disabled”);
});
Did you miss a “#” in your jQuery selector?
arbei wrote:
Did you miss a “#” in your jQuery selector?Hi, yes sorry :)not works
$(function_ () {
$(“#x_idGruppi[value=‘1’]”).prop(“disabled”, true );
$(“#x_idGruppi[value=‘1’]”).attr(“disabled”, true );
$(“#x_idGruppi[value=‘1’]”).attr(“disabled”, “disabled”);
}
GT73 wrote:
arbei wrote:
Did you miss a “#” in your jQuery selector?Hi, yes sorry :)not works
$(function_ () {
$(“#x_idGruppi[value=‘1’]”).prop(“disabled”, true );
$(“#x_idGruppi[value=‘1’]”).attr(“disabled”, true );
$(“#x_idGruppi[value=‘1’]”).attr(“disabled”,
“disabled”);
}
in the test environment it works
GT73 wrote:
in the test environment it works
$("input[name='x_idGruppi[]'][value='1']").attr("disabled", true )//in the test environment it works, bu tnot in php maker page
$("input[name='x_idGruppi[]']").attr("disabled", true )//disabled all option works in php maker page
I had to insert a timer for the function because the search is in ajax. Is it not possible to connect it to the lookuptable search event?//diabled default single options groups id
setTimeout(function(){ // timeout for ajax research
$(“input[name=‘x_idGruppi’][value=‘1’]”).attr(“disabled”, “true” );
$(“input[name=‘x_idGruppi’][value=‘2’]”).attr(“disabled”, “true” );
$(“input[name=‘x_idGruppi’][value=‘3’]”).attr(“disabled”, “true” );
$(“input[name=‘x_idGruppi’][value=‘4’]”).attr(“disabled”, “true” );
}, 1000);
GT73 wrote:
I had to insert a timer for the function because the search is in ajax. Is
it not possible to connect it to the lookuptable search event?//diabled default single options groups id
setTimeout(function(){ // timeout for ajax research
$("input[name='x_idGruppi[]'][value='1']").attr("disabled",
“true” );
$("input[name='x_idGruppi[]'][value='2']").attr("disabled",
“true” );
$("input[name='x_idGruppi[]'][value='3']").attr("disabled",
“true” );
$("input[name='x_idGruppi[]'][value='4']").attr("disabled",
“true” );
}, 1000);however, if the default checkbox is checked, the server event does not see it as it is disabled. Unfortunately the readonly on single option is not available in jq, which idea?