AJAX Populated Views Exposed Filter I'm re-building a travel website and need the trip search form to have the "Arrivals" select populated using AJAX once the departures has been selected to remove any empty search results.

I have followed all the tutorials I could find online, namely: Views AJAX Dynamic Dependent Exposed Filters &amp; AJAX populated filter breaks when Views Dependant Filter module added, applied patch #106 from https://www.drupal.org/node/1183418 and nothing seems to work. I'm also not getting any error messages which makes it harder to debug.

I've attached my custom module code to the bottom of this post.

Any help or ideas are appreciated as I've been stuck on this for over a week now.

    function dependant_keyword_filter_form_views_exposed_form_alter(&amp;$form, &amp;$form_state){
    if ($form['#id'] == 'views-exposed-form-trips-page') {

        if($form_state['input']['field_departure_tid'] === 'All')
            $form['field_arrival_tid']['#disabled'] = 1;
        }
}

function _sort_alphabetically($form, $form_state) {
        foreach ($form_state['view']-&gt;filter as $field =&gt; $filter) {
            if ($filter-&gt;options['exposed']  &amp;&amp; $filter-&gt;options['id'] == 'field_arrival_tid' ) {
                $field_id = $form['#info']["filter-field_arrival_tid"]['value'];
                asort($form[$field_id]['#options']);
            }
        }
        return $form;
}

function _update_arrival_callback($form, $form_state) {
    return $form['field_arrival_tid'];
}

function _get_associative_array_from_view($viewID, $viewDisplayID, $keyFieldID, $valueFieldID, $contextualFilter){
    $associativeArray = array();
    $associativeArray['All'] = t('- Any -');
    $viewResults = views_get_view_result($viewID, $viewDisplayID, $contextualFilter);
    foreach($viewResults as $viewRow) {
        $associativeArray[$viewRow-&gt;$keyFieldID] = $viewRow-&gt;$valueFieldID;
    }
    return $associativeArray;
}
Try to change: 

if($form_state['input']['field_departure_tid'] === 'All')


in 

if($form_state['input']['field_departure_tid'] == 'All')


And inside _form_alter function add this string to see the content of field_departure_tid

var_dump($form_state['input']['field_departure_tid']) 


because if I don't wrong remember field_departure_tid is a number not a string.