WordPress OSINT, maintenance or security needs? Reach out!
TLDWP

Plugin: salesforce-wordpress-to-lead (Used by 140 domains)

Brilliant Web-to-Lead for Salesforce

πŸ‘€ Nick Ciske πŸ“¦ v2.7.3.9 πŸ”— Plugin Homepage

Brilliant Web-to-Lead for Salesforce creates a solid integration between your WordPress install(s) and your Salesforce CRM account! People can enter a contact form on your site, and the lead (or case) goes straight into Salesforce CRM: no more copy pasting lead info, no more missing leads: each and every one of them is in Salesforce.com for you to follow up.

Features

You can fully configure all the different settings for the form, and then use a shortcode to insert the form into your posts or pages, or you can use the widget that comes with the plugin and insert the form into your sidebar!

Previous contributors:

Filters and Hooks

Note:

  • These should be placed in your active theme functions.php or a functionality plugin.
  • Never edit a plugin directly (unless you understand the implications of doing so).
  • You can use Pluginception to create a custom plugin for these to make them independent of your theme: https://wordpress.org/plugins/pluginception/

Filters

salesforce_w2l_api_url

Change the API url the plugin posts data to. Passes the form type (lead or case)

add_filter( 'salesforce_w2l_api_url', 'my_w2l_api_url', 10, 2 );

function my_w2l_api_url( $url, $form_type ){
    return 'https://my.custom-api-url.com/something/';
}

sfwp2l_validate_field

Provide your own validation logic for each field.

An error array is passed in, along with the field name, submitted value, and field configuration (type, default value, required, etc).

Here’s an example of blocking common free email providers:

add_filter('sfwp2l_validate_field','block_non_biz_emails', 10, 4);

function block_non_biz_emails( $error, $name, $val, $field ){

    if( $name == 'email' ){

        $non_biz_domains = array( 'gmail.com', 'yahoo.com', 'hotmail.com', 'aol.com' );

        $domain = array_pop(explode('@', $val));

        if( in_array( $domain, $non_biz_domains ) ){
            $error['valid'] = false;
            $error['message'] = 'Please enter a business email addresss.';
        }

    }

    return $error;
}

You can add to the $non_biz_domains to block other providers as well.

salesforce_w2l_form_html

HTML of the form before it’s returned to WordPress for display

salesforce_w2l_cc_user_from_name

Change from name (user confirmation)

salesforce_w2l_cc_user_from_email

Change from email (user confirmation)

salesforce_w2l_cc_admin_from_name

Change from name (admin notification)

salesforce_w2l_cc_admin_from_email

Change from email (admin notification)

salesforce_w2l_cc_admin_email_list

Adding this code to your functions.php file will add 3 emails to the list. You can add as many as you want and each will get an admin notification email.

add_filter('salesforce_w2l_cc_admin_email_list','salesforce_add_emails');

function salesforce_add_emails( $emails ){

//uncomment line below to remove site admin
//unset($emails[0]);

$emails[]='[email protected]';
$emails[]='[email protected]';
$emails[]='[email protected]';

return $emails;
}

salesforce_w2l_cc_user_email_content

salesforce_w2l_cc_admin_email_content

Allows you to filter (append, prepend, modify) the email message content sent to the user or admin(s).

add_filter('salesforce_w2l_cc_user_email_content','salesforce_filter_user_message', 10, 1);

function salesforce_filter_user_message( $message ){

    $message = 'Before the user message' . "\r\n\r\n" . $message . "\r\n\r\n" . 'After the user message';

    return $message;

}

add_filter('salesforce_w2l_cc_admin_email_content','salesforce_filter_admin_message', 10, 1);

function salesforce_filter_admin_message( $message ){

    $message = 'Before the admin message' . "\r\n\r\n" . $message . "\r\n\r\n" . 'After the admin message';

    return $message;

}

salesforce_w2l_cc_admin_replyto_email

Filter the Reply-To email header (e.g. to allow replies to go to the form submitter)

salesforce_w2l_returl

salesforce_w2l_returl_{Form ID}

Allows you to filter the value of a field before it is output to dynamically populate it with a value, auto set it based on another value, etc.

Examples:

// Filter Return/Success URL on a specific form
// salesforce_w2l_returl_{Form ID}
add_filter( 'salesforce_w2l_returl_1_tester', 'salesforce_w2l_returl_1_tester_example', 10, 1 );
function salesforce_w2l_returl_1_tester_example(  $returl ){

    return 'http://123.com';

}

salesforce_w2l_success_message

salesforce_w2l_success_message_{Form ID}

Allows you to filter the contents of the success message before it is output to dynamically populate it with a value, auto set it based on another value, etc.

Examples:

// Filter Success Message on a specific form
// salesforce_w2l_success_message_{Form ID}
add_filter( 'salesforce_w2l_success_message_1_tester', 'salesforce_w2l_success_message_1_tester_example', 10, 1 );
function salesforce_w2l_success_message_1_tester_example(  $success ){

    return 'Testing 123';

}

salesforce_w2l_field_value

salesforce_w2l_field_value_{Form ID}_{Field Name}

Allows you to filter the value of a field before it is output to dynamically populate it with a value, auto set it based on another value, etc.

Note that the second filter requires you to replace {Form ID} and {Field Name} to be replaced with the relevant form id and field name.

If you need access to the field or form settings in your filter you can use:

$field = salesforce_get_field( $field_name, $form_id );

$form = salesforce_get_form( $form_id );

Examples:

// Pre-check a checkbox

add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_value_precheck_example', 10, 3 );

function salesforce_w2l_field_value_precheck_example( $val, $field, $form ){

    $form_id = 1; // form id to act upon
    $field_name = 'checkboxfield__c'; // API Name of the field you want to auto check

    if( $form == $form_id && $field_name == $field && ! $_POST )
        return 1; // or whatever the value of your checkbox is

    return $val;

}



// Store HTTP referrer in a field (this is not 100% reliable as the browser sends this value to the server)

add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_value_referrer_example', 10, 3 );

function salesforce_w2l_field_value_referrer_example( $val, $field, $form ){

    $form_id = 1; // form id to act upon
    $field_name = 'referrer__c'; // API Name of the field you want to autofill

    if( $form == $form_id && $field_name == $field ){
        if( isset( $_SERVER['HTTP_REFERER'] ) ){
            return $_SERVER['HTTP_REFERER'];
        }
    }

    return $val;

}



// Autofill fields based on thew query string (using Google Analytics tracking variables in this example)

add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_value_querystring_example', 10, 3 );

function salesforce_w2l_field_value_querystring_example( $val, $field, $form ){

    $form_id = 1; // form id to act upon
    $field_name = 'source__c'; // API Name of the field you want to autofill
    $qs_var = 'source'; // e.g. ?source=foo

    if( $form == $form_id && $field_name == $field ){
        if( isset( $_GET[ $qs_var ] ) ){
            return $_GET[ $qs_var ];
        }
    }

    return $val;

}



// Autofill a user's country based on IP

add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_value_geoip_example', 10, 3 );

function salesforce_w2l_field_value_geoip_example( $val, $field, $form ){

    // Based on this plugin: https://wordpress.org/plugins/geoip-detect/
    // Adjust this code to the one used by your geo detection plugin

    if( !function_exists( 'geoip_detect2_get_info_from_current_ip' ) ) return;

    $form_id = 1; // form id to act upon
    $field_name = 'country__c'; // API Name of the field you want to autofill

    if( $form == $form_id && $field_name == $field ){

        $userInfo = geoip_detect2_get_info_from_current_ip();
        //$val = $userInfo->country->isoCode; // e.g. US
        $val = $userInfo->country->name; // e.g. United States

    }

    return $val;

}



// Autofill a date
// https://codex.wordpress.org/Function_Reference/current_time
// http://php.net/manual/en/function.date.php

add_filter( 'salesforce_w2l_field_value', 'salesforce_w2l_field_value_date_example', 10, 3 );

function salesforce_w2l_field_value_date_example( $val, $field, $form ){

    $form_id = 1; // form id to act upon
    $field_name = 'mydatefield__c'; // API Name of the field you want to auto check

    if( $form == $form_id && $field_name == $field && ! $_POST )
        return current_time('Y-m-d'); // or whatever date format you want

    return $val;

}

salesforce_w2l_form_action

Allows you to remove the form action.

// Remove Form Action
add_filter( 'salesforce_w2l_form_action', 'salesforce_w2l_form_action_example', 10, 1 );
function salesforce_w2l_form_action_example(  $action ){

    return '';

}

salesforce_w2l_lead_source

Allows you to alter the lead source (per form or globally).

// Alter Lead Source
add_filter( 'salesforce_w2l_lead_source', 'salesforce_w2l_lead_source_example', 10, 2 );
function salesforce_w2l_lead_source_example(  $lead_source, $form_id ){

    if( $form_id == 1 )
        return 'Example Lead Source for Form #1 on page id #'.get_the_id();

    return $lead_source;

}

salesforce_w2l_post_args

Allows filtering of the wp_remote_post arguments (e.g. extend the timeout, increase redirect limit, etc).

add_filter( 'salesforce_w2l_post_args', 'salesforce_w2l_post_args_example' );

function salesforce_w2l_post_args_example( $args ){

    $args['timeout'] = 10; // http timeout in seconds
    return $args;

}

salesforce_w2l_post_data

Allows filtering of the post data before it is sent to SalesForce.

add_filter( 'salesforce_w2l_post_data', 'salesforce_w2l_post_data_example', 10, 3 );

function salesforce_w2l_post_data_example( $post, $form_id, $form_type ){
    error_log( 'POST ARGS = '.print_r( $post, 1 ) );
    $post['test'] = 'test';
    return $post;
}

salesforce_w2l_show_admin_nag_message

Suppress the organization id missing nag message (return false).

add_filter( 'salesforce_w2l_show_admin_nag_message', '__return_false', 10, 1 );

Actions

salesforce_w2l_before_submit

Allows you to do something (read only) with the post data before it’s submitted to SalesForce.

e.g. Send it to another API, log it to a database, etc.

If you need to change the data, use the salesforce_w2l_post_data filter.

add_action('salesforce_w2l_before_submit', 'salesforce_w2l_before_submit_example', 10, 3 );

function salesforce_w2l_before_submit_example( $post, $form_id, $form_type ){
    error_log( 'BEFORE SUBMIT '.print_r($post,1) );
}

salesforce_w2l_error_submit

Allows you to do something (read only) with the post data when there is an error submitting to SalesForce.

e.g. Notify someone via email, log it somewhere, etc.

add_action('salesforce_w2l_error_submit', 'salesforce_w2l_error_submit_example', 10, 4 );

function salesforce_w2l_error_submit_example( $result, $post, $form_id, $form_type ){
    error_log( 'ERROR SUBMIT ' . print_r($result,1) );
}

salesforce_w2l_after_submit

Allows you to do something (read only) with the post data after it’s submitted to SalesForce.

e.g. Send it to another API, log it to a database, etc.

add_action('salesforce_w2l_after_submit', 'salesforce_w2l_after_submit_example', 10, 3 );

function salesforce_w2l_after_submit_example( $post, $form_id, $form_type ){
    error_log( 'AFTER SUBMIT '.print_r($post,1) );
}

salesforce_w2l_get_prefixed_inputs

Allows you to add to or change the list of fields that are auto prefixed by the plugin to avoid collisions with WP Query reserved request parameters

add_filter('salesforce_w2l_get_prefixed_inputs', 'salesforce_w2l_get_prefixed_inputs_example', 10, 1 );

function salesforce_w2l_get_prefixed_inputs_example( $fields ){
    $fields[] = 'new_field_name';
    return $fields;
}

salesforce_w2l_input_name_prefix

Allows you to change the default field name prefix (_sf) used to avoid collisions with WP Query reserved request parameters.

add_filter('salesforce_w2l_input_name_prefix', 'salesforce_w2l_input_name_prefix_example', 10, 1 );

function salesforce_w2l_input_name_prefix_example( $prefix ){
    return 'sfwp2lprefix_';
}
DomainExposuresHeadersLast Checked
t*x*s*t*g*r*n*a*s.com βœ… F 2026-05-16 15:13:30
t*x*s*t*g*r*n*a*.com βœ… F 2026-05-16 15:13:30
t*x*s*h*r*l*i*e*r*n*a*.com (WP 6.9.1) πŸ”“ F 2026-05-16 12:38:51
u*i*i*i*s*a*i*g*.c*.uk βœ… C 2026-05-16 06:08:01
b*i*z*r*-*f*d*l*a*s.com (WP 6.1.10) ⚠️ F 2026-05-15 20:38:18
a*a*a*o*t*e*s*.com βœ… F 2026-05-15 12:22:00
s*e*e*o*k*y*t*a*e*i*s.com βœ… F 2026-05-15 04:46:33
j*s*p*n*r*o*e.com (WP 6.5.3) βœ… F 2026-05-14 23:53:12
e*t*r*a*n*e*t*l*t*p*r*n*r*.com (WP 6.9.4) βœ… F 2026-05-14 11:51:48
y*u*m*d*c*r*c*n*e*t.com (WP 6.9.4) βœ… D 2026-05-14 00:28:53
b*n*i.com βœ… D 2026-05-13 09:12:51
e*a*l*m*n*m*s*e*y.com (WP 4.9.26) ⚠️ D 2026-05-13 03:15:46
e*e*t*o*r*e*e*f*e*e*g*a*d.com βœ… F 2026-05-12 18:22:20
g*n*a*e*t*r*.com βœ… F 2026-05-11 16:01:09
g*n*a*e*t*x*e*t.com βœ… F 2026-05-11 16:01:09
g*n*a*e*t.com βœ… F 2026-05-11 16:01:09
g*n*n*e*t*o*s.com βœ… F 2026-05-11 15:19:06
b*o*.m*g.c*m.br (WP 6.8.5) βœ… A 2026-05-10 19:42:15
g*o*a*-*i*i*a*-*o*e*.com (WP 6.0.3) ⚠️ F 2026-05-10 14:33:04
p*l*g*o*j*k*.de βœ… F 2026-05-10 10:55:54
3*c*n*e*t*o*i*t*c*.com (WP 6.8.5) βœ… D 2026-05-10 06:47:35
3*-*o*t*n*-*o*i*t*c*.com (WP 6.8.5) βœ… D 2026-05-10 05:44:02
s*l*c*e*u*t*n*w.com (WP 6.9.4) βœ… F 2026-05-10 01:52:12
w*s*f*c*i*s*r*n*e.com βœ… F 2026-05-09 16:43:52
w*s*f*c*f*n*n*i*l*d*i*o*y.com βœ… F 2026-05-09 16:43:52
w*s*f*c*f*n*n*i*l.com βœ… F 2026-05-09 16:43:52
n*i*n*e*.org βœ… F 2026-05-09 14:49:35
s*g*m*b.com (WP 6.9.4) βœ… F 2026-05-09 14:47:21
s*i*m*r*h*c*g*.com βœ… F 2026-05-09 13:21:19
t*m*l*m*d*c*l.ca βœ… F 2026-05-09 13:08:29
g*s*n*e*.com βœ… F 2026-05-08 17:53:08
c*g*a*b*g*t*u*k*.com βœ… B 2026-05-08 05:42:27
c*g*a*b*g*t*u*k.com βœ… B 2026-05-08 05:42:27
g*o*e*i*.ca βœ… F 2026-05-07 18:15:25
c*i*o.com (WP 6.9.4) βœ… D 2026-05-06 18:01:17
t*e*c*n*e*.org πŸ’€ F 2026-05-06 17:58:35
s*a*e*o*.se (WP 6.9.4) βœ… A 2026-05-04 09:58:23
w*s*e*o*i*s.com βœ… B 2026-05-04 05:56:33
u*i*i*i*s*a*i*g*.com βœ… C 2026-05-03 12:43:12
u*e*g*r*a*e*r*c*s.com βœ… B 2026-05-02 21:04:53
n*v*c*e.com (WP 6.9.4) βœ… F 2026-05-02 17:26:54

Top 50 Plugins

Plugin Count
elementor 1,804,676
contact-form-7 1,774,647
elementor-pro 1,052,070
woocommerce 818,340
revslider 619,144
jetpack 467,731
js_composer 433,323
wp-rocket 334,871
essential-addons-for-elementor-lite 294,324
gravityforms 267,431
complianz-gdpr 257,450
cookie-law-info 231,984
instagram-feed 228,564
google-site-kit 222,556
sitepress-multilingual-cms 221,752
google-analytics-for-wordpress 214,471
header-footer-elementor 210,692
elementskit-lite 207,322
bluehost-wordpress-plugin 190,863
gutenberg 162,584
gutenberg-core 159,846
cookie-notice 151,934
the-events-calendar 131,901
litespeed-cache 131,432
wpforms-lite 129,761
gtranslate 128,218
astra-sites 119,760
popup-maker 116,331
woocommerce-payments 113,135
tablepress 109,632
coblocks 99,799
honeypot 97,660
astra-addon 95,518
duracelltomi-google-tag-manager 93,815
wp-smushit 93,763
all-in-one-seo-pack 93,505
LayerSlider 91,849
bb-plugin 90,940
premium-addons-for-elementor 87,068
megamenu 86,751
akismet 86,190
cleantalk-spam-protect 84,014
mailchimp-for-wp 83,922
woocommerce-gateway-stripe 83,240
ml-slider 81,279
fusion-builder 79,819
borlabs-cookie 79,764
ewww-image-optimizer 79,228
wp-pagenavi 79,010
formidable 78,217

Top 50 Themes

Theme Count
hello-elementor 617,059
Divi 511,773
astra 424,516
flatsome 134,423
Avada 124,557
generatepress 120,600
pub 110,164
oceanwp 83,645
kadence 78,687
enfold 71,972
salient 66,826
twentytwentyfour 59,044
h4 56,523
twentyseventeen 56,327
bb-theme 55,346
cocoon-master 52,131
betheme 51,975
blocksy 50,852
dt-the7 46,271
twentytwentyfive 43,949
neve 39,466
Avada-Child-Theme 37,700
gox 33,497
woodmart 33,358
bridge 32,952
sydney 32,697
twentytwentyone 32,175
lightning 31,481
twentytwenty 30,111
swell 28,627
Impreza 26,527
bricks 26,071
twentytwentythree 24,067
Newspaper 23,540
voxel 22,441
twentytwentytwo 20,010
epik-redesign 19,274
sinatra 19,268
kubio 19,196
uncode 19,156
twentysixteen 18,262
storefront 17,916
pro 17,884
Total 14,759
extendable 14,627
yith-wonder 14,051
hello-theme-child-master 13,391
themify-ultra 13,012
yootheme 12,981
factory-templates-4 12,937