Note that there are some explanatory texts on larger screens.

plurals
  1. POWordpress Contact Form 7 and 3'rd Party integration
    primarykey
    data
    text
    <p>I am trying to integrate wordpress CF7 with a third party CRM. I managed to send the data to the CRM using the following filter:</p> <pre><code>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'; } </code></pre> <p>Basically what i did is changing the "form action" from the regular CF7 to the WebtoLead action. I also mapped the Cf7 form with the following attributes (taken from the CRm sample form):</p> <pre><code>[hidden mbp1 "222626"] [hidden URLToReturn "http://thankyoupage.com/thankyou"] [hidden Companies_Account_Status_Code "546"] [hidden Companies_Company id:Companies_Company "Website Enquiry"] &lt;div&gt; [text* Contacts_Contact id:Contacts_Contact class:name]&lt;label&gt;name*:&lt;/label&gt; [tel* Companies_PhoneNumber id:Companies_PhoneNumber class:telelabelhone] &lt;label&gt;phone*: &lt;/label&gt; [email Companies_Email id:Companies_Email class:email]&lt;label&gt; mail:‬&lt;/label&gt; [textarea Companies_Note 50x8 id:Companies_Note]&lt;label&gt;message:&lt;/label&gt; &lt;/div&gt; [submit onclick="return OnButton1(); id:send_contact class:submit] </code></pre> <p>So this did work for me and i managed to receive the data on the CRM, but as i need the data to be stored in the wordpress database as well, i would like it to be both send to the CRM and keep the regular wordpress functionality.And as I cannot use 2 "actions" in 1 form i have to use some different way.</p> <p>I was trying to implement this by using a few methods , like using "wpcf7_before_send_mail" hook or "wpcf7_after_send_mail", and even using a 3'rd party integration plugin for CF7 (<a href="http://wordpress.org/plugins/contact-form-7-3rd-party-integration/screenshots/" rel="nofollow">http://wordpress.org/plugins/contact-form-7-3rd-party-integration/screenshots/</a>) but unfortunatly with ot much success.</p> <p>I would greatly appreciate your help on the matter.</p> <p>Here is the full code of the sample Crm integration</p> <pre><code>&lt;!-- URL is in action attribute. For all inputs the name attribute is used by the back-end system so don't change them --&gt; &lt;form id="big_contact_form" name="Web2LeedForm" action="https://www.myapps-systems.com/api/WebToLeed.asp" method="POST" onsubmit="return submitForm();"&gt; &lt;input type="hidden" name="mbp1" value="222626"/&gt; &lt;input type="hidden" name="URLToReturn" value="http://test.co.il/contact/thankyou"/&gt; &lt;input type="hidden" name="Companies_Account_Status_Code" value="546" /&gt; &lt;!-- must be exactly this name and value --&gt; &lt;input type="hidden" id="Companies_Company" name="Companies_Company" value="website enquiry"/&gt; &lt;!-- the Companies_Company field is mandatory, we don't use it so we just fill it with a value --&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt;*&lt;/td&gt; &lt;th class="form_label"&gt;&lt;label for="Contacts_Contact"&gt;name: &lt;/label&gt;&lt;/th&gt; &lt;td&gt;&lt;input class="input" type="text" id="Contacts_Contact" name="Contacts_Contact"/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;*&lt;/td&gt; &lt;th class="form_label"&gt;&lt;label for="Companies_PhoneNumber"&gt;phone: &lt;/label&gt;&lt;/th&gt; &lt;td&gt;&lt;input class="input" type="text" id="Companies_PhoneNumber" name="Companies_PhoneNumber"/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;th class="form_label"&gt;&lt;label for="Companies_Email"&gt;mail: &lt;/label&gt;&lt;/th&gt; &lt;td&gt;&lt;input class="input" type="text" id="Companies_Email" name="Companies_Email"/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;th class="form_label"&gt;&lt;label for="Companies_Note"&gt;message:&lt;/label&gt;&lt;/th&gt; &lt;td&gt;&lt;textarea id="Companies_Note" name="Companies_Note" rows="8" cols="50"&gt;&lt;/textarea&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;input id="send_contact" name="submit" type="submit" value="שלח" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; </code></pre> <p>Thank you</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload