Wednesday, April 1, 2015

How to Populate WFFM form Fields using QueryString Parameters

Sometimes you might need to populate a Sitecore WFFM form fields by using Query String parameter values comes from URL. 





Following is the process or configuration to do that.

When you try to add a WFFM form using default WFFM "Form" webcontrol, you will see a checkbox with name "ReadQueryString" (refer below image). 

If you have this checkbox is clicked, and if you pass any url parameters with a name of a fields in the WFFM form, sitecore will automatically populate that value (as you see in the above image)


5 comments:

  1. Good tip, I thought that is an 1 April Fool.. But the Field is there, and it works :)

    ReplyDelete
  2. I am working on multilingual site, so added versions for each field in other languages. This is not working for any other language apart from English where field name exactly matches with querystring.

    How to achieve pre-populating field values in multilingual site setup?

    ReplyDelete
  3. by " so added versions for each field in other languages" did you mean you directly went to field item of the form and added language versions ? To translate a form, you need to go to Form Designer and change the language. then translate the fields using form designer.
    If the field name is same, this should populate it in any language (haven't tried it though)

    ReplyDelete