I looked in the forum and didn't see a working example of how to post information from a Chronoform to ZoHo. I came up with a really simple way of doing it using the new Authentication Token.
On the OnSubmit Event add a Custom Code action.
That's it! With a valid token this should submit the contact's First Name, Last Name, Email, and Lead Source.
On the OnSubmit Event add a Custom Code action.
<?php
//Get your auth code through the ZoHo
$auth = 'YOUR AUTH CODE';
//This is a very basic lead. See https://zohocrmapi.wiki.zoho.com/insertRecords-Method.html#Sample_Lead_XMLDATA
$xml = '<Leads>
<row no="1">
<FL val="Lead Source">Website</FL>
<FL val="First Name">'.$form->data['first_name'].'</FL>
<FL val="Last Name">'.$form->data['last_name'].'</FL>
<FL val="Email">'.$form->data['email'].'</FL>
</row>
</Leads>';
//Initialize connection
$ch = curl_init('https://crm.zoho.com/crm/private/xml/Leads/insertRecords');
curl_setopt($ch, CURLOPT_VERBOSE, 1);//standard i/o streams
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);// Turn off the server and peer verification
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//Set to return data to string ($response)
curl_setopt($ch, CURLOPT_POST, 1);//Regular post
//Set post fields
$query = "authtoken={$auth}&scope=crmapi&xmlData={$xml}";
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);// Set the request as a POST FIELD for curl.
//Execute cUrl session
$response = curl_exec($ch);
curl_close($ch);
?>
That's it! With a valid token this should submit the contact's First Name, Last Name, Email, and Lead Source.