Yii Form 1.0
2024-08-26
1259次浏览
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
- mongodb
- redis
- apidoc
- Yii 1.1
- validation
- Yii 2.0
- http
- runner
- extensions
- console
- error handler
- gii
- mailer
- cache
- http 客户端
- queue
- twig
- hydrator
- translator
- widget
- sphinx
- router
- log
- symfonymailer
- assets
- config
- db
- swagger
- middleware
- imagine
- elasticsearch
- 图书
- swiftmailer
- widgets
- definitions
- i18n
- IDE
- fastroute
- csrf
- user