You are here

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

File

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

Class

CountryStateWidget
Plugin implementation of the 'country_state_widget' widget.

Namespace

Drupal\country_state_city\Plugin\Field\FieldWidget

Code

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