xodigital/formerly 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

xodigital/formerly

Composer 安装命令:

composer require xodigital/formerly

包简介

Craft Plugin that allows users to build their own forms and view form submissions

README 文档

README

Installing

  1. Copy the formerly directory into your craft/plugins directory
  2. Browse to Settings > Plugins in the Craft CP
  3. Click on the Install button next to Formerly

Setting up forms

Users (both admin and client) can easily create forms in the Formerly admin section, under the Forms tab. A form consists of:

  • A name, used as the title of the form that a visitor to the site may see
  • A handle, used to programatically refer to this form
  • Several emails that will be sent upon the submission of a form by a visitor
  • Several questions which make up the form

Outputting the form

A form can be rendered using, e,g.

{% set form = craft.formerly.form('handle') %}
{% include 'form.html' with { form: form } %}

Where form.html is Twig code that iterates through the form's questions, creating form markup. An example form.html is provided with the source code for this plugin.

You can also obtain a form instance by having a content editor select a form using the Formerly field type, e.g.

{% include 'form.html' with { form: entry.form } %}

Viewing submissions

Form submissions are a Craft Element, which means that you can query them using regular ElementCriteriaModels. For example, to list submissions to the competition form who have selected Australia as their country:

{% set submissions = craft.formerly.submissions('competition')
  .country('Australia')
  .sort('dateCreated desc') %}
{% for submission in submissions %}
  Name: {{ submission.formhandle_name }}
  Email: {{ submission.formhandle_email }}
  {# ... #}
{% endfor %}

Subscribe to Mailchimp Lists

This function allows for subscribers to be directly subscribed to your mailchimp list.

  1. When adding a form, switch ON the Mailchimp toggle.
  2. Enter your Mailchimp username - used to sign in to mailchimp
  3. Enter your Mailchimp API key
  4. Enter your Mailchimp List Id
  5. For each question, if you have a Custom Merge Tag set in Mailchimp, you must add it under Mailchimp Merge Tag

Each submission will then be added to the list in Mailchimp

Todo

  • Better validation
  • More question attributes, e.g. placeholder, error messages

xodigital/formerly 适用场景与选型建议

xodigital/formerly 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.14k 次下载、GitHub Stars 达 58, 最近一次更新时间为 2015 年 09 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 xodigital/formerly 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 2.14k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 58
  • 点击次数: 16
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 58
  • Watchers: 6
  • Forks: 23
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-09-18