mzur/kirby-uniform
Composer 安装命令:
composer require mzur/kirby-uniform
包简介
A versatile Kirby plugin to handle web form actions.
README 文档
README
A versatile Kirby plugin to handle web form actions.
This is Uniform for Kirby >=3. You can find Uniform for Kirby 2 in the kirby-2 branch.
Builtin actions:
- Email: Send the form data by email.
- EmailSelect: Choose from multiple recipients to send the form data by email.
- Log: Log the form data to a file.
- Login: Log in to the Kirby frontend.
- SessionStore: Store the form in the user's session.
- Upload: Handle file uploads.
- Webhook: Send the form data as an HTTP request to a webhook.
Quick example
Controller:
<?php use Uniform\Form; return function ($kirby) { $form = new Form([ 'email' => [ 'rules' => ['required', 'email'], 'message' => 'Email is required', ], 'message' => [], ]); if ($kirby->request()->is('POST')) { $form->emailAction([ 'to' => 'me@example.com', 'from' => 'info@example.com', ])->done(); } return compact('form'); };
Template:
<form action="<?php echo $page->url() ?>" method="POST"> <input name="email" type="email" value="<?php echo $form->old('email'); ?>"> <textarea name="message"><?php echo $form->old('message'); ?></textarea> <?php echo csrf_field(); ?> <?php echo honeypot_field(); ?> <input type="submit" value="Submit"> </form> <?php if ($form->success()): ?> Success! <?php else: ?> <?php snippet('uniform/errors', ['form' => $form]); ?> <?php endif; ?>
Installation
Install Uniform via Composer: composer require mzur/kirby-uniform
Or download the repository and extract it to site/plugins/uniform.
Setup
Add this to your CSS:
.uniform__potty { position: absolute; left: -9999px; }
Note: Disable the Kirby cache for pages where you use Uniform to make sure the form is generated dynamically.
Documentation
For the full documentation head over to Read the Docs.
Questions
See the answers in the docs, post an issue if you think it is a bug or create a topic in the forum if you need help.
Contributing
Contributions are always welcome!
Donations
Since some people insist on sending me money for this (free) plugin you can do this here.
mzur/kirby-uniform 适用场景与选型建议
mzur/kirby-uniform 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 73.44k 次下载、GitHub Stars 达 261, 最近一次更新时间为 2016 年 12 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「form」 「kirby」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mzur/kirby-uniform 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mzur/kirby-uniform 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mzur/kirby-uniform 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Diese Contao 4 Erweiterung stellt Google reCAPTCHA V2 in Form eines neuen Formularfeldes im Formulargenerator bereit. This extension provides Google reCAPTCHA V2 in the form of a new form field in the form generator of Contao Open Source CMS.
Zero-dependency global `kirbylog()` helper for any content
Courier offers a convenient and painless solution for creating emails tailored for your Kirby website.
A Laravel Filament Forms slug field.
Blade template for Kirby
Search Kirby with Loupe
统计信息
- 总下载量: 73.44k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 261
- 点击次数: 14
- 依赖项目数: 11
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2016-12-26