Yii Form 1.0
2024-08-26
1356次浏览
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
- view
- auth client
- html
- bootstrap
- release
- redis
- Yii 1.1
- apidoc
- mongodb
- http
- db
- validation
- cache
- Yii 2.0
- runner
- extensions
- console
- gii
- error handler
- mailer
- http 客户端
- queue
- twig
- translator
- hydrator
- widget
- sphinx
- log
- assets
- config
- router
- middleware
- symfonymailer
- elasticsearch
- widgets
- swiftmailer
- imagine
- 图书
- rbac
- swagger
- data
- csrf
- logging
- fastroute
- application