I have a form that asks for a social security number. We don't want to save the SSN in plain text. I thought I could modify the Generated Code for the form. But I can't find it. It says it's located in "~/App_Code/CMSClasses" but that path doesn't exist on the server. I tried copying the Generated Code and adding to the App_Code Folder with my modifications to Encrypt the field. But my modified code was never hit by the form submission.
Is there any way to do this without making the form a custom widget?
Dear Gregg,
Please refer to this documentation article for more details. You would need to develop a custom module (not a custom form widget) and within this module you can hook into event and implement the logic you require on before form submit.
Hi Gregg,
I think there is an easier way of doing this thing. Just hook into a global event for this form submission, BizFormItemEvents.Insert.Before. You can access the raw data submitted and amend however you need it before it gets saved into the database.
Thanks for the reply Dmitry,
How exactly can I hook into that event without making it a custom form widget?
Thanks Dmitry. That's exactly what I needed. The documentation you linked to was for Document Events. But it lead me to the documentation on Form Events and it worked perfectly.
Please, sign in to be able to submit a new answer.