Try our conversational search powered by Generative AI!

XForms - I bet nobody can answer this


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.


Mar 08, 2013 14:58

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 :)

Mar 08, 2013 15:49

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?


Edited, Mar 12, 2013 17:02

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:

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

Mar 13, 2013 9:37


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?


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.