By using $userActions, I did successfully with level [Province] to [District].
But I fail to load [Commune] after [District] was changed.
- Code: Select all
$tableColumns['ProvinceID']= array('display_text' => 'Province', 'perms' => 'EVCTAXQS', 'join' => array('table' => 'lutprovince', 'column' => 'ProvinceID', 'display_mask' => "ProvinceName", 'type' => 'left'),'req' => true, 'input_info' => 'onchange="toAjaxTableEditor(\'update_district\',this.value);"');
$tableColumns['DistrictID']= array('display_text' => 'District', 'perms' => 'EVCTAXQS', 'join' => array('table' => 'lutdistrict', 'column' => 'DistrictID', 'display_mask' => "DistrictName", 'type' => 'left'),'req' => true, 'input_info' => 'onchange="toAjaxTableEditor(\'update_commune\',this.value);"');
$tableColumns['CommuneID']= array('display_text' => 'Commune', 'perms' => 'EVCTAXQS', 'join'=>array('table' => 'lutcommune', 'column' => 'CommuneID', 'display_mask' => 'CommuneName', 'type' => 'left'));
$userActions = array('update_district' => array(&$this,'updateDistrict'));
$this->Editor->setConfig('userActions',$userActions);
--- Code here ---- how to updateCommune? -----