all things Sitecore related

Multistep forms using WFFM (webforms for marketeers)

A question that comes up during the DMC training is whether it’s possible to create multistep forms within Sitecore. Officially Sitecore does not yet support this feature, but it’s not that hard to use the WFFM module to create something that does the job. I’m not a programmer, so the solution I describe here is something I made with what’s available to me as a marketer. This is probably not the best solution, but see it more as a suggestion.

1. Create a couple of pages that is equal to the number of steps the form should consist of.

wffm_001

2. Next create a form in the WFFM module for each step. On the final form all the fields from the previous steps should come back. I would recommend adding goals to each individual form, because this gives a little more insight how visitors use the different steps and gives the option to re-target visitors that not complete the whole process. It’s not necessary to add value to each goal in the intermediate steps.

wffm_001a

wffm_002

wffm_003

wffm_004

3. When all the forms have been created you can tie the forms together by having the thank you page of the first form link to the page where the second form is located and so on.

wffm_005

 

wffm_006

4. Now it’s important to tag all the fields used on the different fields.

wffm_007

5. On the last form we are going to have all the fields from the previous forms being prefilled by using tags and have those fields be hidden from the visitor.

wffm_008

 

wffm_009

wffm_010

 

wffm_004

6. The last step is to add an action that gathers the content of all the fields (also the ones hidden from the visitor) and sent them via email.

wffm_012

This is just an example of how you could create multistep forms from within Sitecore. This may not be the most elegant solution and there are probably much better technical solutions, but it works for now 😉

About the Author

About the Author: .

Subscribe

If you enjoyed this article, subscribe now to receive more just like it.

There Are 9 Brilliant Comments

Trackback URL | Comments RSS Feed

  1. Paul Tiemann says:

    I’m confused by the statement “On the final form all the fields from the previous steps should come back. ” The fields on each of the single step forms will be different that the final step form. Are you saying you created fields with exactly the same name on the final form as their corresponding field in a step form? I’m surprised that WFFM would somehow use the same user entered value on the final form as it did, in the step form but your saying that it does?
    Thank you!
    Paul

    • Jeroen Huizinga says:

      Hi Paul, thank you for your comment. Let me clarify. Out-of-the box the WFFM doesn’t support multi-step forms, but I described a simple way to tie three separate forms into a single process. In order to tie the separate forms together I use the final form to inherit the data that was filled out in the previous steps. That’s why I need the fields from the previous steps to come back on the last form, prefill them with the data that the user put in and hide them from the user. In this way the user thinks it’s a multi-step form, but in reality only the last step matters, because in this step all the data is merged and one single report can be created. The advantage of using different forms is that it’s now very easy to use automation to re-engage visitors who did not complete all the steps.

  2. mrutyunjaya says:

    Hi Jeroen ,
    Thank you for your blog. But I am a just beginner of sitecore.
    Do you have any blog /material I will go for step by step sothat after I will catch complex task soon

    Thanks
    Mrutyunjaya

  3. Hi Paul,

    I followed your steps and it works like charm, however I found at last step it always maintains first time entries done by user, in case if user tries this steps multiple time with same browser.

  4. Drazen Janjicek says:

    Hi Jeroen,

    I actually load the tag value in each step because when I go back to a previous step I want the field to be prefilled. When I change a value the last step shows the edited value. So good so far… But now when I submit the last step I want the tags to be cleared because going to step 1 in the same browser (or new tab) again prefills my previous data. What API would you recommend in Sitecore 8?

    Thanks,
    Drazen

  5. Drazen Janjicek says:

    I think I found what I need… Interesting to see by the way that tags keep a history. I’m just not sure if I really want to delete the data.

    • Drazen Janjicek says:

      In case anybody else needs it (and sorry for spamming btw :-))

      public class ClearFormBasedVisitorTags : ISaveAction
      {
      public void Execute(ID formid, AdaptedResultList fields, params object[] data)
      {
      if (fields != null && Tracker.Current.IsActive)
      {
      IContactTagsContext context = Tracker.Current.Session.Contact.Tags;

      foreach(AdaptedControlResult field in fields)
      {
      if (context.Find(field.FieldName) != null)
      {
      context.RemoveAll(field.FieldName);
      }
      }
      }
      }
      }

Post a Comment

Your email address will not be published. Required fields are marked *

Top