Webform Pagebreaks Infringing on Salesforce Submissions
Tue, Sep 1, 2009 by Steve
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.
Steve posted on September 2, 2009 10:44 pm
Boris, thanks for the input. We are filing the issue with the relevant module.
Boris Mann posted on September 2, 2009 2:25 am
Have you filed an issue with the sf_webform module? That sounds like the place to fix it.
Generally, when you make a post like this, we expect links to filed issues and MAYBE an attempt at a patch, rather than "we hacked around it with some JQuery".
Post new comment