XForms - I bet nobody can answer this

Vote:
 

Is there any way you can encrypt the form data when using XForms before it is submitted into the database but not encrypted as an email as I need to save to database and send the email.

Thanks

#66757
Mar 08, 2013 14:58
Vote:
 

Hook up to private static void XForm_BeforeSubmitPostedData(object sender, SaveFormDataEventArgs e)

Pick the values you need for sending an email, encrypt the rest, send email :)

#66758
Mar 08, 2013 15:49
Vote:
 

So, if I picked Email and Save to database, it would send the email first? Then encrypt the data?

What about decrypting it when viewing it in the CMS?

Thanks

#67796
Edited, Mar 12, 2013 17:02
Vote:
 

I would probably take control over the email-sending myself, and let xforms take care of the database saving. I.e you, pick the data you need in your email, send it via your own code, and then decrypt the data before saving it to database.

This is (some of the information) described here: http://labs.episerver.com/en/Blogs/Linus-Ekstrom1/Dates/2009/8/Altering-the-XForm-email-body-to-make-it-look-more-like-the-actual-form/

For reading back the encryptet contents, you probably have to alter the built in functionality for reading the xforms-data, and decrypt it. You can find the bulit in functionality (depending on your installation) here: C:\Program Files\EPiServer\CMS\6.1.379.0\Application\UI\CMS\Edit\XFormPostings.ascx

To replace it you make a folder in your solution, placed under UI/edit and place the new XFormsPostings.ascx there

#67808
Mar 13, 2013 9:37
Vote:
 

Hi,

The top bit works a treat, but getting the XFormPosting page into the Sites root as you mention above doesnt work. Besides, how could I Decrypt the content if the backend code is wrapped in the DLL?

 

#67870
Edited, Mar 13, 2013 17:04
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.