You are here

protected function CountryWidget::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 CountryWidget::getInitialValues()
CountryWidget::formElement in src/Plugin/Field/FieldWidget/CountryWidget.php
Returns the form for a single field widget.

File

src/Plugin/Field/FieldWidget/CountryWidget.php, line 85

Class

CountryWidget
Plugin implementation of the 'country_widget' widget.

Namespace

Drupal\country_state_city\Plugin\Field\FieldWidget

Code

protected function getInitialValues() {
  $initial_values = [
    'country' => '',
  ];
  return $initial_values;
}