承接 gromit/oc-forms-plugin 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gromit/oc-forms-plugin

Composer 安装命令:

composer require gromit/oc-forms-plugin

包简介

Frontend forms builder for OctoberCMS.

README 文档

README

GromIT.Forms is a Simple and powerful frontend forms constructor for October CMS.

Creating forms

For create new form go to Forms in the main menu. Then click on Add form button.

On next page you can create new empty form. Form key must be unique.

After creating new empty form you can add fields on the form. For doing this click on Add field button and choose field type. You can add as many fields as you want.

reCAPTCHA

GromIT.Forms has Google reCAPTCHA support.

For use reCAPTCHA on your forms you must go to Settings -> Forms plugin settings -> reCAPTCHA and enter your site key and secret key. You can obtain keys in reCAPTCHA control panel.

Rendering Forms

For render form on page go to CMS -> Pages -> Your page and drop Form component from the sidebar to the page. Then in component settings choose form for render. All forms renders without styling so all CSS is up to you.

Another option is render form by yourself. You can do this like on the sample below.

title = "Form"
url = "/"

[gromitForms]
==
{% set form = gromitForms.getForm('test-form-key') %}
<div id="my-form">
    <form data-request="gromitForms::onSubmit"
          data-request-update="success: '#my-form'"
          data-request-validate
          data-request-files
          data-request-flash>
        <input type="hidden" name="form_key" value="{{ form.key }}">
        <div>
            <label>
                Your name
                <input type="text" name="your_name" required>
            </label>
        </div>
        <button type="submit">Submit</button>
    </form>
</div>

<script src="{{ ['@jquery', '@framework', '@framework.extras'] | theme }}"></script>

Do not forget to add October AJAX framework with extras and field form_key with form key.

Export and import forms

After creating the form you can export this for importing later. This is very useful for testing form on your development machine and import on production later.

For export for go to form editing page and click on Export button at the bottom of the page.

For import form go to Forms page and click upload button. Then choose file and click Upload. If form with key from uploaded file already exists key will be suffixed with random string.

Export submissions

For export submissions

  • go to Forms -> Submissions
  • click on Export button in the toolbar
  • choose form
  • click Export

Events

There are some events provided by the plugin. You can catch them and do something with this.

Event::listen(
    'gromit.forms::form.submitting',
    function (Form $form, array $data, ?array $requestData, ?array $userData) {
        //
    }
);

Event::listen(
    'gromit.forms::form.submitted',
    function (Form $form, Submission $submission) {
        //
    }
);

gromit/oc-forms-plugin 适用场景与选型建议

gromit/oc-forms-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 5, 最近一次更新时间为 2021 年 04 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 gromit/oc-forms-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 gromit/oc-forms-plugin 我们能提供哪些服务?
定制开发 / 二次开发

基于 gromit/oc-forms-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-21