I have two modules: scuole and classi. Relations one to many.
In the Classe popup, i filtered scuola listbox with the scuola selected in the iscrizioni module. The result is correct!!

Add the initial_filter in to Editviewdefs.php file
1 =>
array (
'name' => 'classe',
'studio' => 'visible',
'label' => 'LBL_CLASSE',
'displayParams' =>
array (
'initial_filter' => '&kr_scuole_kr_classi_name_advanced=#_scuola|Scuol a|OK',
),
),

And modify function open_popup into include\javascript\ sugar_grp1.js

function open_popup(module_name,width,height,initial_filter ,close_popup,hide_clear_button,popup_request_data, popup_mode,create,metadata)
{
window.document.popup_request_data=popup_request_d ata;window.document.close_popup=close_popup;URL='i ndex.php?'
+'module='+module_name
+'&action=Popup';
//START Filtro Pop Up
if(initial_filter!='')
{
var as_ = initial_filter.split("=");
var as1 = as_[1];

if( as1.substring(0,2) == "#_"){
as1 = as1.substring(2);

//as1 = as1.substring(0, (as1.length -2) );

var elementi = as1.split("|");

var campo_ = elementi[0];
var label_ = elementi[1];
var controllo_ = elementi[2];

URL+='&query=true'+as_[0]+"=" + document.getElementById(campo_).value;

if(controllo_ == "OK" && document.getElementById(campo_).value == ""){
alert('Scegliere un ' + label_);
document.getElementById(as1).focus();
return false;
}
}else{
URL+='&query=true'+initial_filter;
}
}
//END Filtro Pop Up

if(hide_clear_button)
{URL+='&hide_clear_button=true';}

Now, how can I change the list of Classe to the Scuola selected by filtering? (can I filter the javax list?)



Thanks!!!