2

We have a requirement to pre-populate the Contact Form with user information on load if the user is a logged in user. So that, user need not fill his information using the webform. Is there any way to do this using webforms for marketers?

Data is coming from a service api in json format. Need to figure out a way to bind it to fields either in server side or in client side.

Sitecore Version 7.1 140117 WFFM Version "Web Forms for Marketers 2.4.0 rev. 140117"

0

3 Answers 3

4

Have a look at Sitecore - Webforms For Marketers Form - Use ReadQueryString Option. Basically, there is a checkbox, ReadQueryString, in presentation details that gives you the option to fill in the default values from the query string. If checked, you use the item names of the fields (not the display name or title) as keys and the values you want to set the fields to as the values in key-value pair in the querystring.

Sign up to request clarification or add additional context in comments.

Comments

0

Create a new rule based on use default value from user profile [fieldname] field and amend it to pick up the value from your service API.

This will be your best way and simplest option in my opinion.

I use this same approach prepopulating ucommerce data from its API.

Comments

0

Create custom field and then you can pre-populate values as per your need. Like if you want to populate any value in Single line text field the create custom field for this and then reflect forms dll and copy code then update code as per your need.

Please check https://sitecoretweaks.wordpress.com/2015/02/20/custom-field-type-for-sitecore-web-form-for-marketers/ blog post for more details.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.