Search code examples
sitecoreweb-forms-for-marketers

Handling Multiple WFFM Forms on single page w/Dynamic tabs


We have a page with three Web Forms For Marketers forms that are on three separate DHTML tabs. If a user fills out and submits the form, they end up back on the default tab, and their thank message is on the tab of the form they filled out.

We looked into possibly using hastags to indicate which tab you are on so we can set the proper focus when the page loads after the WFFM Form postsback, but hashtags are stripped off the URL during the postback. Query string parameters do seem to survive the postback, but having the tab navigation set these would incur a post back themselves, eliminating the advantage of using DHTML tabs.

Does anyone have a good solution for handling displaying the correct tab after the postback?

Sitecore Version: 6.4.1 (rev. 110324) Web Forms for Marketers-2.2.0 (rev. 110303)


Solution

  • For an alternative method, you could use javascript to update a cookie eat time the tab is changed. When the page is next loaded, the cookie is checked to find out what the last tab the user was on and restores that tab as the default one (it could also clear the cookie at this point).