<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>MachForm Community Forums Topic: Salesforce and Machform guide</title>
<link>https://www.machform.com/forums/</link>
<description>MachForm Community Forums Topic: Salesforce and Machform guide</description>
<language>en</language>
<pubDate>Wed, 06 May 2026 04:37:49 +0000</pubDate>

<item>
<title>yuniar on "Salesforce and Machform guide"</title>
<link>https://www.machform.com/forums/topic/salesforce-and-machform-guide#post-23037</link>
<pubDate>Wed, 01 Apr 2015 05:32:19 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">23037@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;offersnet -- you can use the &#34;send form data to another site&#34; option. Here's an example:&#60;br /&#62;
&#60;a href=&#34;http://www.appnitro.com/blog-mailchimp-integration&#34; rel=&#34;nofollow&#34;&#62;http://www.appnitro.com/blog-mailchimp-integration&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>offersnet on "Salesforce and Machform guide"</title>
<link>https://www.machform.com/forums/topic/salesforce-and-machform-guide#post-23004</link>
<pubDate>Fri, 27 Mar 2015 01:34:31 +0000</pubDate>
<dc:creator>offersnet</dc:creator>
<guid isPermaLink="false">23004@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;what about posting the form data into other CRMs besides SalesForce? We have a &#34;home grown&#34; Lead management / distribution platform as well as our own ESP front end that i would love to know more about understanding how to post the form data into them. Thanks in advance for any suggestions / help!
&#60;/p&#62;</description>
</item>
<item>
<title>morsecode on "Salesforce and Machform guide"</title>
<link>https://www.machform.com/forums/topic/salesforce-and-machform-guide#post-22321</link>
<pubDate>Thu, 11 Dec 2014 14:01:12 +0000</pubDate>
<dc:creator>morsecode</dc:creator>
<guid isPermaLink="false">22321@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Insert below:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if(empty($error_elements) &#38;#38;&#38;#38; empty($process_result[&#38;#39;custom_error&#38;#39;])){		

			$process_result[&#38;#39;status&#38;#39;] = true;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>petersj77 on "Salesforce and Machform guide"</title>
<link>https://www.machform.com/forums/topic/salesforce-and-machform-guide#post-22023</link>
<pubDate>Tue, 21 Oct 2014 19:16:02 +0000</pubDate>
<dc:creator>petersj77</dc:creator>
<guid isPermaLink="false">22023@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;In Machform 4.2 there are only 4506 lines in &#34;includes/post-functions.php&#34; so can't find line 5277.&#60;/p&#62;
&#60;p&#62;There are 2 occurrences of &#34;$process_result['status'] = true;&#34; in the file&#60;/p&#62;
&#60;p&#62;Please advise as to where I should add the code&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
</item>
<item>
<title>yuniar on "Salesforce and Machform guide"</title>
<link>https://www.machform.com/forums/topic/salesforce-and-machform-guide#post-21681</link>
<pubDate>Mon, 01 Sep 2014 07:10:59 +0000</pubDate>
<dc:creator>yuniar</dc:creator>
<guid isPermaLink="false">21681@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Wow! that's very thorough explanation! Thank you so much for sharing this!&#60;br /&#62;
Many people have asked for this and I'll direct them to this post :-)&#60;/p&#62;
&#60;p&#62;Thanks again!
&#60;/p&#62;</description>
</item>
<item>
<title>morsecode on "Salesforce and Machform guide"</title>
<link>https://www.machform.com/forums/topic/salesforce-and-machform-guide#post-21661</link>
<pubDate>Thu, 28 Aug 2014 13:18:08 +0000</pubDate>
<dc:creator>morsecode</dc:creator>
<guid isPermaLink="false">21661@https://www.machform.com/forums/</guid>
<description>&#60;p&#62;Hello everyone,&#60;/p&#62;
&#60;p&#62;First I want to thank the people at Machform for not having monthly or per user pricing! Long live one-time fee option software! I'd rather not pay for expensive monthly salesforce apps so I thought I'd take stab at connecting machform and salesforce myself :)&#60;/p&#62;
&#60;p&#62;On with the show ...&#60;/p&#62;
&#60;p&#62;I wanted to make a post about my journey in connecting machform with salesforce. It's actually quite simple. My goal was to submit the form data to a custom object within salesforce. Lets get started.&#60;/p&#62;
&#60;p&#62;1. Download the Salesforce PHP toolkit from here:&#60;br /&#62;
&#60;a href=&#34;https://github.com/developerforce/Force.com-Toolkit-for-PHP/archive/master.zip&#34; rel=&#34;nofollow&#34;&#62;https://github.com/developerforce/Force.com-Toolkit-for-PHP/archive/master.zip&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;2. Unzip. Then upload the &#34;soapclient&#34; folder to your Machform directory. For example, /machform/soapclient/.&#60;/p&#62;
&#60;p&#62;3. Create a file named &#34;sfconfig.php&#34; with the following contents:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php
/*salesforce connection*/
require_once (SOAP_CLIENT_BASEDIR.&#38;#39;/SforceEnterpriseClient.php&#38;#39;);
require_once (SOAP_CLIENT_BASEDIR.&#38;#39;/SforcePartnerClient.php&#38;#39;);
require_once (SOAP_CLIENT_BASEDIR.&#38;#39;/SforceHeaderOptions.php&#38;#39;);
$username=&#38;quot;xxx&#38;quot;;
$pass=&#38;quot;xxx&#38;quot;;
$token=&#38;quot;xxx&#38;quot;;
$mySforceConnection = new SforcePartnerClient();
$mySoapClient 	 	= $mySforceConnection-&#38;gt;createConnection(SOAP_CLIENT_BASEDIR.&#38;#39;/partner.wsdl.xml&#38;#39;);
$mylogin 			= $mySforceConnection-&#38;gt;login($username,$pass.$token );
/*salesforce connection*/
?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Be sure to fill in the $username, $pass and $token variables with your own details.&#60;/p&#62;
&#60;p&#62;4. Upload &#34;sfconfig.php&#34;  to the &#34;includes&#34; directory. For example, &#34;machform/includes/sfconfig.php&#34;.&#60;/p&#62;
&#60;p&#62;5. Edit includes/post-functions.php. Around line 5277 find:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$process_result[&#38;#39;status&#38;#39;] = true;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;6. Below that paste:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == XXX) {
        define(&#38;quot;SOAP_CLIENT_BASEDIR&#38;quot;, &#38;quot;soapclient&#38;quot;);
        include(&#38;quot;sfconfig.php&#38;quot;);
        //Creating the Candidate Object
        $createFields = array(
            &#38;#39;Full_Name__c&#38;#39; =&#38;gt; $table_data[&#38;#39;element_2&#38;#39;],
            &#38;#39;Email__c&#38;#39; =&#38;gt; $table_data[&#38;#39;element_3&#38;#39;]
        );
        $sObject = new stdclass();
        $sObject-&#38;gt;fields = $createFields;
        $sObject-&#38;gt;type = &#38;#39;Candidate__c&#38;#39;;
        //Submitting the Candidate to Salesforce
        $upsertResponse = $mySforceConnection-&#38;gt;upsert(&#38;quot;Email__c&#38;quot;, array ($sObject));
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Note: Replace XXX with your form id (you can find your form id in your address bar when viewing your form from the browser: mysite.com/machform/view.php?id=XXX&#60;/p&#62;
&#60;p&#62;Note2: see below if your form is a multipage form.&#60;/p&#62;
&#60;p&#62;7. Let's go over the above code:&#60;/p&#62;
&#60;p&#62;a)&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$createFields = array(
            &#38;#39;Full_Name__c&#38;#39; =&#38;gt; $table_data[&#38;#39;element_2&#38;#39;],
            &#38;#39;Email__c&#38;#39; =&#38;gt; $table_data[&#38;#39;element_3&#38;#39;]
        );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;i) &#34;Full_Name__c&#34; is the API Name of the Full Name field I created within Salesforce.&#60;/p&#62;
&#60;p&#62;ii) &#34;$table_data['element_2']&#34; - element_2 is the input name machform created when it created the form. For example: &#38;lt;input id=&#34;element_2&#34; class=&#34;element text medium&#34; type=&#34;text&#34; value=&#34;&#34; name=&#34;element_2&#34;&#38;gt;&#38;lt;/input&#38;gt;. Right click the page in your browser and &#34;view source&#34; to locate the input name you are looking for.&#60;/p&#62;
&#60;p&#62;b)&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$sObject-&#38;gt;type = &#38;#39;Candidate__c&#38;#39;;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Replace &#34;Candidate__c&#34; with whatever salesforce object you are working with. For example, Lead, Account, Custom__c&#60;/p&#62;
&#60;p&#62;c)&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;//Submitting the Candidate to Salesforce
        $upsertResponse = $mySforceConnection-&#38;gt;upsert(&#38;quot;Email__c&#38;quot;, array ($sObject));&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Notice I've used the &#34;upsert&#34; function, which is the same as the &#34;insert&#34; function, except it will replace an existing record if the &#34;Email__c&#34; data is the same.&#60;/p&#62;
&#60;p&#62;That's it!&#60;/p&#62;
&#60;p&#62;BONUS:&#60;/p&#62;
&#60;p&#62;What if I have a multi-page form? This might not be the best way, but this worked for me:&#60;/p&#62;
&#60;p&#62;1. Edit includes/post-functions.php. Around line 5277 find:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;$process_result[&#38;#39;status&#38;#39;] = true;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Insert below:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($input[&#38;#39;page_number&#38;#39;] == 1) {
 $_SESSION[&#38;#39;is_valid_user&#38;#39;] = true;
 $_SESSION[&#38;#39;form_data_page_1&#38;#39;] = $table_data;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This captures the data from page 1 and puts it into the $_SESSION['form_data_page_1'] array. You can add more lines below this to capture other pages:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($input[&#38;#39;page_number&#38;#39;] == 2) {
 $_SESSION[&#38;#39;is_valid_user&#38;#39;] = true;
 $_SESSION[&#38;#39;form_data_page_2&#38;#39;] = $table_data;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;2. Then instead of pasting the block of code from step 6 here, find:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;}else{ //if this is the last page&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;around Line 5629&#60;/p&#62;
&#60;p&#62;and paste below:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if ($form_id == XXX) {
    define(&#38;quot;SOAP_CLIENT_BASEDIR&#38;quot;, &#38;quot;soapclient&#38;quot;);
    include(&#38;quot;sfconfig.php&#38;quot;);
    //Creating the Candidate Object
    $createFields = array(
        &#38;#39;Full_Name__c&#38;#39; =&#38;gt; $_SESSION[&#38;#39;form_data_page_1&#38;#39;][&#38;#39;element_1&#38;#39;],
        &#38;#39;Email__c&#38;#39; =&#38;gt; $_SESSION[&#38;#39;form_data_page_1&#38;#39;][&#38;#39;element_2&#38;#39;]
    );
    $sObject = new stdclass();
    $sObject-&#38;gt;fields = $createFields;
    $sObject-&#38;gt;type = &#38;#39;Candidate__c&#38;#39;;
    //Submitting the Candidate to Salesforce
    $upsertResponse = $mySforceConnection-&#38;gt;upsert(&#38;quot;Email__c&#38;quot;, array ($sObject));
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Notice: $_SESSION['form_data_page_1']['element_1']&#60;/p&#62;
&#60;p&#62;Hope this helps!&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
