Support » Plugin: Gravity Forms Salesforce Add-on » [Plugin: Gravity Forms Salesforce Add-on] Custome Lead Source

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Zack Katz

    (@katzwebdesign)

    This feature support was added in version 1.1.1. gf_salesforce_lead_source is the filter.

    Here’s a code sample:

    add_filter('gf_salesforce_lead_source', 'make_my_own_lead_source', 1, 3); 
    
    function make_my_own_lead_source($lead_source, $form_meta, $data) {
    	// $lead_source - What was about to be used (normally Gravity Forms Form Title)
    	// $form_meta - Gravity Forms form details
    	// $data - The data passed to Salesforce
    
    	return $lead_source; // Return something else if you want to.
    }

    Can you explain a little more how to use this code?

    I put it in the functions file and set the lead source as “Website” and when my site loaded it was a blank screen.

    The code I included:

    add_filter('gf_salesforce_lead_source', 'make_my_own_lead_source', 1, 3); 
    
    function make_my_own_lead_source($lead_source, $form_meta, $data) {
    	// $lead_source - What was about to be used (normally Gravity Forms Form Title)
    	// $form_meta - Gravity Forms form details
    	// $data - The data passed to Salesforce
    
    	$lead_source = 'Website'
    
    	return $lead_source;
    }

    Thanks for your help.

    Hi Zack

    what do i need to change in your code here?

    I created a hidden field name “lead_source” and i gave it a value, but it still use the form name

    i put your code as is in the function.php file of my theme – do i need to change something in it?

    Has anyone found a solution of this?

    mwanthony

    (@mwanthony)

    bmartinstudio,

    I think you need a semicolon like so:

    $lead_source = ‘Website’;

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Gravity Forms Salesforce Add-on] Custome Lead Source’ is closed to new replies.