荷兰知识库 / zend-form-country-select
Zend Framework 3 的国家选择框
0.2.0
2018-08-21 06:00 UTC
Requires
- php: >= 7.0
- league/iso3166: ^2.1
- lstrojny/functional-php: ^1.8
- zendframework/zend-form: ^2.12
Requires (Dev)
- phpunit/phpunit: ^7
This package is auto-updated.
Last update: 2024-09-12 05:10:06 UTC
README
为 zend-form (Zend Framework 3) 提供的国家下拉选择。
支持 2 位字母 ISO 3166 编码
选项将在当前区域设置中显示。
安装
$ composer require polderknowledge/country-dropdown
使用
在 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'], ], ]);
渲染方式与普通选择元素相同。