[wordpress插件] A Forms表格

wordpress 插件 文章 2020-01-22 22:40 588 0 全屏看文

AI助手支持GPT4.0

评分

80

80

描述

A wordpress plugin that allows you to add a form on your website.

一个wordpress插件,可让您在网站上添加表单。

It’s quite easy to configure, some what like C Forms II, but you have the ability to get regular updates and its available on the WordPress Plugin site.

配置非常容易,有些类似于C Forms II,但是您可以定期获取更新,并且可以在WordPress插件站点上获得它。

Since version 2.0.2, you can now create advanced validation rules.

从2.0.2版开始,您现在可以创建高级验证规则。

There are unlimited amount of validation rules that you could have in a form which makes it difficult to manage using a UI.

验证规则的形式是无限的,这使得使用UI进行管理变得困难。

In A Forms you can now create a Global variable called $GLOBALS[“aforms_additional_validations_for_4”] (where 4 is the id of the form) in your themes function file and set a validation array to it.

现在,您可以在A表单中的主题函数文件中创建一个名为$ GLOBALS [“ aforms_additional_validations_for_4”]的全局变量(其中4是表单的ID),并为其设置一个验证数组。

For example lets say you have an email field, a contact field and a preferred method of contact field.

例如,假设您有一个电子邮件字段,一个联系人字段和一种首选的联系人方法。

The preferred method of contact field is a checkbox field with the values Email and Phone.

首选的联系方式字段是一个复选框字段,其值为电子邮件和电话。

You want to make sure your visitor fills in Phone if Phone is selected by the preferred method of contact.

如果通过首选联系方式选择了“电话”,则要确保访客填写“电话”。

All you need to do is assign an array like $GLOBALS[“aforms_additional_validations_for_4”][“a_form_contact_us_phone”] = “required” to $GLOBALS[“aforms_additional_validations_for_4”] (remember to replace the 4 with your forms id) if the phone field is

您需要做的就是将一个像$ GLOBALS [“ aforms_additional_validations_for_4”] [“ a_form_contact_us_phone”] =“ required”的数组分配给$ GLOBALS [“ aforms_additional_validations_for_4”](请记住将4替换为您的表单ID)

empty while the preferred method of contact is Phone.

空,而首选的联系方式是电话。

Here is some sample code:

以下是一些示例代码:

add_action( ‘init’, ‘register_a_forms_additional_validations’ );

add_action('init','register_a_forms_additional_validations');

function register_a_forms_additional_validations() {
    

函数register_a_forms_additional_validations(){
    

$GLOBALS[“aforms_additional_validations_for_4”] = array();
    

$ GLOBALS [“ aforms_additional_validations_for_4”] = array();
    

if (isset($_POST[“a_form_contact_us_preferred_method_of_contact_1”]) && isset($_POST[“a_form_contact_us_phone”]) && $_POST[“a_form_contact_us_preferred_method_of_contact_1”] == “Phone” && $_POST[“a_form_contact_us_phone”] == “”) {

if(isset($ _ POST [“ a_form_contact_us_preferred_method_of_contact_1”])&& isset($ _ POST [“ a_form_contact_us_phone“])&& $ _POST [“ a_form_contact_us_preferred_method_of_contact_1”] ==“ Phone” && $ _POST =“ _ a_]


        


        

$GLOBALS[“aforms_additional_validations_for_4”][“a_form_contact_us_phone”] = “required”;
    

$ GLOBALS [“ aforms_additional_validations_for_4”] [“ a_form_contact_us_phone”] =“必填”;
    

}
    

}
    

if (isset($_POST[“a_form_contact_us_preferred_method_of_contact_0”]) && isset($_POST[“a_form_contact_us_email”]) && $_POST[“a_form_contact_us_preferred_method_of_contact_0”] == “EMail” && $_POST[“a_form_contact_us_email”] == “”) {

if(isset($ _ POST [“ a_form_contact_us_preferred_method_of_contact_0”])&& isset($ _ POST [“ a_form_contact_us_email“])&& $ _POST [“ a_form_contact_us_preferred_method_of_contact_0”] ==“ EMail” _____ [=


        


        

$GLOBALS[“aforms_additional_validations_for_4”][“a_form_contact_us_email”] = “required”;
    

$ GLOBALS [“ aforms_additional_validations_for_4”] [“ a_form_contact_us_email”] =“必填”;
    

}

}

}

}

安装步骤

1) Install WordPress 4.4.1 or higher

1)安装WordPress 4.4.1或更高版本

2) Download the latest from:

2)从以下位置下载最新版本:

https://wordpress.org/extend/plugins/jquery-ui-theme

https://wordpress.org/extend/plugins/jquery-ui-theme

https://wordpress.org/extend/plugins/a-forms

https://wordpress.org/extend/plugins/a-forms

3) Login to WordPress admin, click on Plugins / Add New / Upload, then upload the zip file you just downloaded.

3)登录WordPress管理员,单击“插件” /“添加新文件” /“上传”,然后上传您刚刚下载的zip文件。

4) Activate the plugin.

4)激活插件。

下载地址

https://downloads.wordpress.org/plugin/a-forms.2.5.1.zip

https://downloads.wordpress.org/plugin/a-forms.2.5.1.zip

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Block Plugin Update阻止插件更新
[wordpress插件] Busy Server繁忙的服务器
[wordpress插件] WordPress Backup and Migrate Plugin – Backup GuardWordPress备份和迁移插件– Backup Guard
[wordpress插件] ACF Admin Flexible Content CollapseACF管理员灵活的内容折叠
[wordpress插件] CFS – Ninja Forms SelectorCFS –忍者表格选择器
随便看看
教育科技公司申请微信支付被拒绝? 3858
微信公众号免300认证教程 4955
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4075
小程序广告组件通过审核,但是小程序内没有显示广告? 4153
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8021
问题? 7254
如何快速搭建抽奖助手小程序(无需代码知识) 5039
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 5993
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5511
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5207