2

Using sc8.2u3 with WFFM 8.2u3

I have the "Save Action" as "Create Item" for a WFFM. And also, the data will be stored in SQL tables.

Followed this article to encrypt the data. The data being saved in the tables is encrypted, but it is not, in the item created in the CMS.

Are there two different actions being executed when user clicks on Submit.

What needs to be done, so that the item created also has encrypted field values.

3
  • 2
    Yes. Every "Save Action" is an isolated step.
    – Mark Cassidy
    Commented Nov 21, 2017 at 11:13
  • @MarkCassidy. Is there a way I can restrict a custom save action to fir only on WFFM submit. I could check templates but the author may create their own.
    – sukesh
    Commented Nov 21, 2017 at 11:16
  • I don't follow? Save Actions are defined for every WFFM form as "Submit Actions". You could roll your own, "Encrypted Create Item".
    – Mark Cassidy
    Commented Nov 21, 2017 at 11:24

1 Answer 1

1

As per my understanding, you are looking for a solution to encrypt or decrypt the form data.

We got the similar challenge to encrypt or decrypt the values, I am sharing my experience as below.

We have performed our desired operation before data save action. Here we did some customization in Sitecore form fields and written some pipeline that deals with data before save action. This code will update the submitted form data based on some attributed available in specific field.

The solution what we implemented is -

• Addition of Custom attribute - Added custom attribute “Parameters” field so that any field which has this attribute will be considered for encryption/decryption.

<encryptValue>true</encryptValue>

• Write a pipeline for "wffm.submit" - this pipeline will execute before default save action. Here we need to write logic to perform the respective operation. Once an operation is performed, the system will save the value in all targeted place Sitecore tree, mongo or custom database.

 <wffm.submit>
        <processor type="WFFM.Cusomization RegisterFormSubmitEvent,WFFM.Cusomization" patch:before="processor[@type='Sitecore.Forms.Mvc.Pipelines.Submit.RegisterFormSubmitEvent,Sitecore.Forms.Mvc']"/>
      </wffm.submit>

Hope it would help you.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.