Php Wordpress联系表7和3';第三方整合
我正在尝试将wordpress CF7与第三方CRM集成。 我设法使用以下筛选器将数据发送到CRM:Php Wordpress联系表7和3';第三方整合,php,forms,wordpress,Php,Forms,Wordpress,我正在尝试将wordpress CF7与第三方CRM集成。 我设法使用以下筛选器将数据发送到CRM: add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url'); function wpcf7_custom_form_action_url() { return 'https://www.myapps-systems.com/api/WebToLeed.asp'; } 基本上,我所做的是将“表单操作”从常规CF7
add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url');
function wpcf7_custom_form_action_url()
{
return 'https://www.myapps-systems.com/api/WebToLeed.asp';
}
基本上,我所做的是将“表单操作”从常规CF7更改为WebtoLead操作。
我还使用以下属性映射了Cf7表单(取自CRm示例表单):
[隐藏mbp1“222626”]
[隐藏URL返回”http://thankyoupage.com/thankyou"]
[隐藏公司\账户\状态\代码“546”]
[隐藏公司\公司id:公司\公司“网站查询”]
[文本*联系人\联系人id:联系人\联系人类别:名称]姓名*:
[电话*公司\电话号码id:公司\电话号码类别:Telelabelphone]
电话*:
[电子邮件公司\电子邮件id:公司\电子邮件类别:电子邮件]邮件:
[textarea companys_Note 50x8 id:companys_Note]消息:
[submit onclick=“return OnButton1();id:send\u联系人类别:submit]
因此,这对我来说确实有效,我设法在CRM上接收数据,但由于我也需要将数据存储在wordpress数据库中,我希望它既能发送到CRM,又能保持wordpress的常规功能。由于我不能以1种形式使用2个“操作”,我必须使用不同的方式
我试图通过使用一些方法来实现这一点,比如使用“wpcf7_before_send_mail”钩子或“wpcf7_after_send_mail”,甚至为CF7使用第三方集成插件()
但不幸的是,我们取得了巨大的成功
我非常感谢你在这件事上的帮助
下面是示例Crm集成的完整代码
<!--
URL is in action attribute.
For all inputs the name attribute is used by the back-end system so don't change them
-->
<form id="big_contact_form" name="Web2LeedForm" action="https://www.myapps-systems.com/api/WebToLeed.asp" method="POST" onsubmit="return submitForm();">
<input type="hidden" name="mbp1" value="222626"/>
<input type="hidden" name="URLToReturn" value="http://test.co.il/contact/thankyou"/>
<input type="hidden" name="Companies_Account_Status_Code" value="546" /> <!-- must be exactly this name and value -->
<input type="hidden" id="Companies_Company" name="Companies_Company" value="website enquiry"/> <!-- the Companies_Company field is mandatory, we don't use it so we just fill it with a value -->
<table>
<tr>
<td>*</td>
<th class="form_label"><label for="Contacts_Contact">name: </label></th>
<td><input class="input" type="text" id="Contacts_Contact" name="Contacts_Contact"/></td>
</tr>
<tr>
<td>*</td>
<th class="form_label"><label for="Companies_PhoneNumber">phone: </label></th>
<td><input class="input" type="text" id="Companies_PhoneNumber" name="Companies_PhoneNumber"/></td>
</tr>
<tr>
<td></td>
<th class="form_label"><label for="Companies_Email">mail: </label></th>
<td><input class="input" type="text" id="Companies_Email" name="Companies_Email"/></td>
</tr>
<tr>
<td></td>
<th class="form_label"><label for="Companies_Note">message:</label></th>
<td><textarea id="Companies_Note" name="Companies_Note" rows="8" cols="50"></textarea></td>
</tr>
<tr>
<td></td>
<td><input id="send_contact" name="submit" type="submit" value="שלח" /></td>
</tr>
</table>
</form>
*
姓名:
*
电话:
邮寄:
信息:
谢谢我使用这个很棒的插件解决了这个问题:
需要修改,但效果很好。
也许你应该使用过滤器<代码> 'WPCF7PoStestDyDATA '/CODE >,并通过<代码> CURL将数据发送到CRM。这里你可以得到一个卷曲的例子:你可能想考虑插件的更新版本。<!--
URL is in action attribute.
For all inputs the name attribute is used by the back-end system so don't change them
-->
<form id="big_contact_form" name="Web2LeedForm" action="https://www.myapps-systems.com/api/WebToLeed.asp" method="POST" onsubmit="return submitForm();">
<input type="hidden" name="mbp1" value="222626"/>
<input type="hidden" name="URLToReturn" value="http://test.co.il/contact/thankyou"/>
<input type="hidden" name="Companies_Account_Status_Code" value="546" /> <!-- must be exactly this name and value -->
<input type="hidden" id="Companies_Company" name="Companies_Company" value="website enquiry"/> <!-- the Companies_Company field is mandatory, we don't use it so we just fill it with a value -->
<table>
<tr>
<td>*</td>
<th class="form_label"><label for="Contacts_Contact">name: </label></th>
<td><input class="input" type="text" id="Contacts_Contact" name="Contacts_Contact"/></td>
</tr>
<tr>
<td>*</td>
<th class="form_label"><label for="Companies_PhoneNumber">phone: </label></th>
<td><input class="input" type="text" id="Companies_PhoneNumber" name="Companies_PhoneNumber"/></td>
</tr>
<tr>
<td></td>
<th class="form_label"><label for="Companies_Email">mail: </label></th>
<td><input class="input" type="text" id="Companies_Email" name="Companies_Email"/></td>
</tr>
<tr>
<td></td>
<th class="form_label"><label for="Companies_Note">message:</label></th>
<td><textarea id="Companies_Note" name="Companies_Note" rows="8" cols="50"></textarea></td>
</tr>
<tr>
<td></td>
<td><input id="send_contact" name="submit" type="submit" value="שלח" /></td>
</tr>
</table>
</form>