Relate Field Auto Populate related Result on other field

Hello I am working with relate field in 3 Different Modules (Province, City and Barangays)

If you click the Province, the choices of the city module should be the same record of the selected province. See below screenshot as my sample:

Expected Result should be like this no need to manually choose a province on a popup result/selection.

I was able to figure it out.

First I add a displayParams at editviewdefs.

'name' => 'custom_city_c',
            'studio' => 'visible',
            'label' => 'LBL_CITY',
            'displayParams' => array(
                'initial_filter' => '&province="+this.form.{$}.value+"&province_name="+this.form.{$}.value+"',

And I add a customize code on city popupdefs.php

    $parametrs_advanced='`dvt2_province_id_c`= "'.$_REQUEST['province'].'"'; // example part of SQL WHERE
    $parametrs_advanced='`dvt2_province_id_c`= ""';// example part of SQL WHERE
$popupMeta = array (
    'moduleMain' => 'dvt3_City',
    'varName' => 'dvt3_City',
    'orderBy' => '',
    'whereStatement'=> "$parametrs_advanced",
    'whereClauses' => array (
  'name' => '',
  'custom_province_c' => 'dvt3_city.custom_province_c',

Now my concern is I don`t want the province field in popupdefs editable. It will only display the pre filtered data, and when I changed the value of the province the City and Barangay field should be empty again to choose new value.