Model/OverrideListModel.php
public function getChoiceFields()
    {
        $choices = parent::getChoiceFields();

        // Shift all extended fields into the "lead" object.
        $resort = false;
        foreach (['extendedField', 'extendedFieldSecure'] as $key) {
            if (isset($choices[$key])) {
                foreach ($choices[$key] as $fieldAlias => $field) {
                    $choices['lead'][$fieldAlias] = $field;
                    unset($choices[$key][$fieldAlias]);
                }
                unset($choices[$key]);
                $resort = true;
            }
        }
        // Sort after we included extended fields (same as core).
        if ($resort) {
            foreach ($choices as $key => $choice) {
                $cmp = function ($a, $b) {
                    return strcmp($a['label'], $b['label']);
                };
                uasort($choice, $cmp);
                $choices[$key] = $choice;
            }
        }

        return $choices;
    }
public function getChoiceFields()
    {
        $choices = parent::getChoiceFields();

        // Shift all extended fields into the "lead" object.
        $resort = false;
        foreach (['extendedField', 'extendedFieldSecure'] as $key) {
            if (isset($choices[$key])) {
                foreach ($choices[$key] as $fieldAlias => $field) {
                    $choices['lead'][$fieldAlias] = $field;
                    unset($choices[$key][$fieldAlias]);
                }
                unset($choices[$key]);
                $resort = true;
            }
        }
        // Sort after we included extended fields (same as core).
        if ($resort) {
            foreach ($choices as $key => $choice) {
                $cmp = function ($a, $b) {
                    return strcmp($a['label'], $b['label']);
                };
                uasort($choice, $cmp);
                $choices[$key] = $choice;
            }
        }

        return $choices;
    }
public function getChoiceFields ( ) { $ choices = parent :: getChoiceFields ( ) ; // Shift all extended fields into the "lead" object. $ resort = false ; foreach ( [ 'extendedField' , 'extendedFieldSecure' ] as $ key ) { if ( isset ( $ choices [ $ key ] ) ) { foreach ( $ choices [ $ key ] as $ fieldAlias => $ field ) { $ choices [ 'lead' ] [ $ fieldAlias ] = $ field ; unset ( $ choices [ $ key ] [ $ fieldAlias ] ) ; } unset ( $ choices [ $ key ] ) ; $ resort = true ; } } // Sort after we included extended fields (same as core). if ( $ resort ) { foreach ( $ choices as $ key => $ choice ) { $ cmp = function ( $ a , $ b ) { return strcmp ( $ a [ 'label' ] , $ b [ 'label' ] ) ; } ; uasort ( $ choice , $ cmp ) ; $ choices [ $ key ] = $ choice ; } } return $ choices ; }
Get a list of field choices for filters.

Alterations to core:
Form validation to support extended fields.

@return array
Get a list of field choices for filters .