Webform Pagebreaks Infringing on Salesforce Submissions

2 Comments

For a recent Drupal 6 project, we used Webform (http://drupal.org/project/webform), Salesforce (http://drupal.org/project/salesforce), and Salesforce Webform Integration (http://drupal.org/project/sf_webform) modules to create a custom form to send user data to Salesforce.com. Since the form was too long, we used the pagebreak component in webform to break the form into multiple pages. This not only improves the visual effects of a long form but it's also more clear when the form is made up of different sections.

On the other hand, we found that the form would try to submit partial data to Salesforce when we would click the 'Next Page' button. This was not what we were expecting.

Due to this problem, we had to turn to javascript to create the same 'Next Page' effect in a webform. We used JQuery to show and hide particular parts of the form when 'Next Page' (which can be a markup) was clicked. The javascript code was added to the form using the 'drupal_add_js' method. This way, the whole form data would be sent to Salesforce when a user clicks the 'Submit' button at the end of the form.

Drupal Integration with Salesforce.com

5 Comments

Currently, we are working on a Drupal 6 project that requires integration with Salesforce.com. We use the Salesforce module for Drupal 6 (http://drupal.org/project/salesforce). We also use the webform module to create the desired form. The data will be sent to Salesforce.com after a user fills out and submits the form.

To achieve this, we need to map the webform fields to Salesforce lead fields. We searched and found the Salesforce Webform Integration module (http://drupal.org/project/sf_webform). We realized later that this module didn't really work with the salesforce-6.x-2.x-dev module. The Salesforce Webform Integration module is using $map['index'] and $map['webform_nid'] to refer to fieldmap index ('fieldmap' field in table 'salesforce_field_map') and webform node id ('nid' field in table 'salesforce_webform'). However, you can't find $map['index'] and $map['webform_nid'] in the 'map' variable in salesforce-6.x-2.x-dev. Instead, salesforce-6.x-2.x-dev is using $map['fieldmap'] to refer to the fieldmap index, and it does not have the webform node id info in the 'map' variable.