dannyvanholten/acf-gravityforms-add-on
Composer 安装命令:
composer require dannyvanholten/acf-gravityforms-add-on
包简介
Advanced Custom Fields: Gravity Forms Add-on
README 文档
README
Provides an Advanced Custom Field which allows a WordPress editorial user or administrator to select a Gravity Form as part of a field group configuration.
Getting started
The plugin is primarily available from the WordPress plugin repository. It allows you to choose a Gravity Form in WordPress Admin and use the selected form ID in your Theme or Plugin to output the form.
This plugin does not have any effect on the output of the website. It adds a custom ACF field type for use in an ACF field group.
Installation and usage
- Upload the plugin files to the
/wp-content/plugins/acf-gravityforms-add-ondirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the 'Plugins' screen in WordPress.
- Add a new field of type 'Forms' to the required ACF field group.
You can also install Advanced Custom Fields: Gravity Forms Add-on using Composer.
composer require dannyvanholten/acf-gravityforms-add-on
…or if you make use of WPackagist, …
composer require wpackagist-plugin/acf-gravityforms-add-on
Using Advanced Custom Fields: Gravity Forms Add-on
To use the the field you just need to know how Advanced Custom Fields work. You can check out their documentation.
The Gravity Forms Add-on returns either an single form object / ID or an array of objects / IDs. Now we know that we can easily use it to build our fields :)
Output of the form in the frontend
This plugin doesn't integrate any code to the frontend of the website. You will need to ensure that your own Plugin or Theme handles the output of the form. An example of how do do this is detailed in this blog post on the Gravity Forms website.
Getting the form ID
Please refer to the documentation for the ACF method get_field for full details of how to use it.
If you return an ID from your ACF field configuration:
$form_id = get_field('my-form'); gravity_form($form_id);
If you return an object/array from your ACF field configuration:
$form = get_field('my-form'); gravity_form($form['id']);
If you return multiple Form IDs from your ACF field configuration:
$form_ids = get_field('my-form'); foreach($form_ids as $form_id) { gravity_form($form_id); }
Filtering the field HTML
Version 1.3.4 added a plain HTML filter to the output of the field. This filter is not applied to fields in ACF version 4.
apply_filters('acf-gravityforms-add-on/field_html', string $field_html, array $field, string $field_options, string $multiple)
Getting involved
Want to get involved and improve Advanced Custom Fields: Gravity Forms Add-on? Fork this repo and whenever you have something just make a pull request. After review we might add it to our GitHub Repository.
Credits
This plugin is maintained by Say Hello GmbH, a specialist WordPress agency in Spiez, Switzerland.
The plugin was initially developed by Danny van Holten based on work by @stormuk, (@lgladdy and @adampope).
dannyvanholten/acf-gravityforms-add-on 适用场景与选型建议
dannyvanholten/acf-gravityforms-add-on 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 43.16k 次下载、GitHub Stars 达 79, 最近一次更新时间为 2017 年 04 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 dannyvanholten/acf-gravityforms-add-on 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dannyvanholten/acf-gravityforms-add-on 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 43.16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 79
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2017-04-07