adt/nette-forms-components
最新稳定版本:v2.2.25
Composer 安装命令:
composer require adt/nette-forms-components
包简介
无描述信息
README 文档
README
Installation
composer require adt/nette-forms-components
ADT\Forms\Form
Nette\Application\UI\Form subclass using ADT\Forms\BoostrapFormRenderer to render a form in Bootstrap 5 (default) or 4.
Overrides addError method (the parent method does not use the translator lazy).
Have @method annotations for all ADT Nette Forms components so PhpStorm auto completion should work out of the box.
ADT\Forms\BoostrapFormRenderer
Can be used on its own, without using ADT\Forms\Form (for example in Ublaboo\DataGrid\DataGrid::createComponentFilter method, which creates Nette\Application\UI\Form instance)
Can be switch to Bootstrap 4 calling ADT\Forms\BoostrapFormRenderer::$version = ADT\Forms\BootstrapFormRender::VERSION_4; (for example in your BasePresenter::beforeRender method).
If it's an AJAX request and the form is not valid, only snippets with error messages will be sent back to browser (without rendering the form).
If you need, you can use static methods ADT\Forms\BoostrapFormRenderer::makeBootstrap and ADT\Forms\BoostrapFormRenderer::sendErrorPayload manually (for example in \Ublaboo\DataGrid\DataGrid::setItemsDetailForm, where the container is created dynamically).
You can use ->setOption('description', 'Description text') to use field description.
You can use ->setOption('prepend', 'Text to prepend') or ->setOption('append', 'Text to append') to use proper inpur group styles.
Containers
Can be used on their own, without using ADT\Forms\Form.
Can be registered in your Bootstrap file like BaseContainer::register();. This will allow you to use addStaticContainer and addDynamicContainer methods in your forms.
统计信息
- 总下载量: 19.85k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04