Yii Form 1.0
2024-08-26
599次浏览
First release of Yii Form package was done. It provides a set of widgets to help with dynamic server-side generation of HTML forms. The following widgets are available out of the box:
- input fields:
Checkbox
,CheckboxList
,Date
,DateTimeLocal
,Email
,File
,Hidden
,Image
,Number
,Password
,RadioList
,Range
,Select
,Telephone
,Text
,Textarea
,Time
,Url
; - buttons:
Button
,ResetButton
,SubmitButton
; - group widgets:
ButtonGroup
,Fieldset
. - other:
ErrorSummary
.
General usage:
use Yiisoft\Form\PureField\Field;
echo Field::text('firstName', theme: 'horizontal')
->label('First Name')
->autofocus();
echo Field::text('lastName', theme: 'horizontal')
->label('Last Name');
echo Field::select('sex')
->label('Sex')
->optionsData(['m' => 'Male', 'f' => 'Female'])
->prompt('—');
echo Field::number('age')
->label('Age')
->hint('Please enter your age.');
echo Field::submitButton('Submit')
->buttonClass('primary');
新闻归档
热门标签
- yii3
- 扩展
- 发布
- yii2
- debug
- auth client
- view
- bootstrap
- html
- release
- redis
- apidoc
- Yii 2.0
- Yii 1.1
- mongodb
- mailer
- extensions
- twig
- gii
- queue
- runner
- http 客户端
- console
- validation
- sphinx
- cache
- widget
- translator
- hydrator
- error handler
- db
- symfonymailer
- log
- http
- config
- assets
- swiftmailer
- 图书
- imagine
- csrf
- elasticsearch
- swagger
- IDE
- i18n
- router
- definitions
- fastroute
- logging
- smarty
- user