Entity view (Content)

Webform Pagebreaks Infringing on Salesforce Submissions

By sshen
Sep. 1, 2009

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. This is just a workaround. If the above pagebreak issue could be resolved, it would definitely make it easier to create multiple pages in a webform that integrates with Salesforce.

Post Tags: