adt/nette-forms-components
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.
adt/nette-forms-components 适用场景与选型建议
adt/nette-forms-components 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23.55k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 03 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 adt/nette-forms-components 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 adt/nette-forms-components 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 23.55k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-03-06