Jump to content


data not displayed in Web Lead

  • Please log in to reply
No replies to this topic

#1 Member



  • Members
  • PipPip
  • 14 posts

Posted 03 May 2017 - 07:00 AM

Hi All,


I'm a New to this X2CRM.


i have a wordpress and X2CRM installed in one Instance. i want to post the data in X2CRM whenever a customer submit a contact us form from WP.


For Reference i used : http://wiki.x2crm.co...acker_Front_End


Below are works i done so far.


1)  i had created a sample template (First name,Last Name,phone,background info). then i took the embedded script and applied in a new page called testing in WP. it was successful.


2) As per the legacy guide, in order to capture the lead form i had created contactform.php and modified the script as per our Instances. PFA

  i have placed APIModel.php file in the same location.


3) when i try to submit the form in WP(contact us) i'm getting a message saying "Message received". when i login to X2CRM back end i could see a test.txt file holding the values which got posted from WP.


After that when i check the database/X2CRM application i couldn't find that record. is there anything i missed?


any additional steps i need to perform? Help here would be really appreciated!


Thanks in advance,



This is the script file


require 'APIModel.php';
$attributes = $_POST;
$contact = new APIModel('admin','API KEY given','https://mydomain/dummy1/index.php');
$fieldMap = array( // This map should be of the format 'your_fieldname'=>'x2_fieldname',
#$contact->attributes = $attributes;
foreach($attributes as $key=>$value){
        $contact->{$fieldMap[$key]}=$value; // Found in field map, used mapped attribute
        $contact->$key=$value; // No match anywhere, assume it's a Contact attribute
file_put_contents('test.txt', json_encode($_REQUEST) );
// Call API to create contact
Header('Location: https://mydomain/wp-admin');// Redirect to homepage

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users