protected function CountryStateCityWidget::getInitialValues in Country, State and City Fields 8
Gets the initial values for the widget.
This is a replacement for the disabled default values functionality.
Return value
array The initial values, keyed by property.
1 call to CountryStateCityWidget::getInitialValues()
- CountryStateCityWidget::formElement in src/
Plugin/ Field/ FieldWidget/ CountryStateCityWidget.php - Returns the form for a single field widget.
File
- src/
Plugin/ Field/ FieldWidget/ CountryStateCityWidget.php, line 85
Class
- CountryStateCityWidget
- Plugin implementation of the 'country_state_city_widget' widget.
Namespace
Drupal\country_state_city\Plugin\Field\FieldWidgetCode
protected function getInitialValues() {
$initial_values = [
'country' => '',
'state' => '',
'city' => '',
];
return $initial_values;
}