Country dropdown for zend-form (Zend Framework 3).
Works with 2-letter ISO 3166 codes
Options are displayed in the current locale.
$ composer require polderknowledge/country-dropdown
in Form::init():
$this->add([
'type' => CountrySelect::class,
'name' => 'country',
'options' => [
// optional countries to display first in the dropdown above a separator
'top_country_codes' => ['NL', 'ES'],
],
]);
Rendering can be done in the same way as a normal select element.