Salesforce Web to Lead Integration with Drupal 7

drupal_128Drupal is a CMS and Salesforce is a CRM. Ever thought to integrate these two platforms and explore new things and uncover the benefits which you get doing this?

Salesforce is quite configurable and Drupal has plenty of modules to work upon as you wish.

To make them synchronize to work them similar to web-to-lead form you just have to follow these steps:

  1. Install module in your Drupal 7 Org.:


2) Generate web-2-lead form from your Salesforce org. having fields you want to display in your webform.


3) Create a webform or clone the existing one. As you want. For cloning your webform there is a need to install following module:

Node Clone:

In order to create new form:

Home>>Administration>>Content>>Add Content


4) Add title to your newly created web form.


5) Add components to your webform


6) In order to link it with Salesforce, click the option “Salesforce Web2Lead”.


7) Check the option asking to submit to Salesforce. Also, provide Lead Source for web form.

drupal_78) Now map your form fields with that of the Salesforce fields

Administration>>Configuration>>Web Services>>Salesforce Webform

While mapping fields you will be seeing a mapping table having two columns:

Key: Webform fields

Value: Salesforce fields

note sf1NOTE:

  • Enable debugging mode in it and you can see the logs of the data entered
  • If you are integrating with your Sandbox Environment then provide “” instead of “


9) To have a look on your Drupal log reports

Administration>>Configuration>>Reports>>Recent log messages


10) Now you can check your leads in Salesforce



After completion of your webform do you want to style it to make it more attractive? As an example let us show label inline of the form instead of displaying it alongside.

What you have to do is just to install a new module Compact Form , configure it and you are done.

Now go to:

Administration>>Configuration>>User Interface

Provide your webform id there


note sf1NOTE: To know your form id you have to just inspect your form and get form id from there.

Now this is how our web form looks like after styling:



It’s always helpful to know somethings extra. Make your form dynamic. For bringing Salesforce Picklist in Drupal 7 here are few steps to follow:

1 Install the module for it. It requires following:

  • Drupal 7
  • Salesforce Suite 7.x-3.x
  • Webform
  • Behavior weights

2 Configure the module and you are done.


3 Just go to your webform components and add new Component. Choose type as Salesforce Picklist.


4 Choose a picklist present in your Salesforce Object which you want to join with your Webform. Save the component.


5 Map it with API name of field present in Salesforce as mentioned above and you are done.

6 Test it by filling your webform and voila your record is created in Salesforce as a new lead.

drupal_17Now enjoy your integration of Drupal with Salesforce. It has become easy for you to store leads by filling out Drupal form. Cheers 🙂

Author: AJ

Share This Post On


  1. This was a really helpful post!!
    Many thanks for sharing your knowledge.

    Post a Reply
  2. Nice information about the integration with drupal. it will really very useful for the interface development, thank you for sharing the information.

    Post a Reply

Submit a Comment

Your email address will not be published.

× How can I help you?