WFFM: Associate form fields with xDB Contact facets

So, you want your Form submissions to update some xDB profile data, e.g. Email, or First name?
Sitecore CMS provides a solution for that out of the box! And it appears to be quite easy.

Imagine we have a simple form:

Screenshot 2016-08-17 11.19.58

Let’s do some magic to bind these form fields to our xDB Contact’s fields.
Open your form in the form designer and go to the Save Actions.

Screenshot 2016-08-17 11.29.34.png

Do you see that “Update Contact Details” save action?  That’s what we need!
Simply add it to the form and click on Edit to associate your form’s fields with contact facets.

Screenshot 2016-08-17 11.32.04.png

Alright, we just established a connection between our form and xDB.

Let’s make a test submission and see if it works.
Oops! Nothing has been added to the xDB so far. Why? Let’s find out from the log file:

WARN  [WFFM] [UPDATE CONTACT DETAILS Save action] User is not authenticated to edit contact details.

Looks strange, isn’t it? Sitecore doesn’t update contact fields for non-authenticated users.

FIX! Luckily, we have this community post, which shows us two options for making this work as expected.

Hopefully, this post saved you a bit of time ^_^~~