Problem/Motivation
commerce_novaposhta/src/Element/Novaposhta.php
city default_value
t('- None -')
line 119:
$city_options = ['' => t('- None -')] + $novaposhtaManager->extractCityOptions($cities);
if you do not select any value immediately when opening the page
line 155:
$element['city'] = [
'#type' => 'select',
'#title' => t('City'),
'#options' => $city_options,
'#default_value' => $values['city'] ?? NULL,
'#required' => $element['#required'],
'#maxlength' => 36,
'#parents' => array_merge($element['#parents'], ['city']),
'#ajax' => [
'callback' => [get_called_class(), 'ajaxRefresh'],
'disable-refocus' => TRUE,
'event' => 'change',
'wrapper' => $wrapper_id,
],
'#default_value' => $values['city'] ?? NULL,
default_value = NULL
There is also no way to set this default value through the admin panel.