SaaS CMS has officially launched! Learn more now.

XForms - Database



Is there a way to stop the data from being stored in the database as we use a different CRM to send the data to? We still need the Send to Database checkbox but to use a webservice to send the form data.



Jun 07, 2018 15:05

Hi Jonathan,

It's been a while since I've had to do it but, as I recall, you'll need to tie in to the BeforeSubmitPostedData event and do something like the following:

private void XForm_BeforeSubmitPostedData(object sender, SaveFormDataEventArgs e)
    if ((e.FormData.ChannelOptions & ChannelOptions.Database) == ChannelOptions.Database)
        e.FormData.ChannelOptions &= ~ChannelOptions.Database;

Jun 08, 2018 16:47

If its an option then you could look into using the new Episerver Forms. You can choose to not save to the database out of the box.


Jun 08, 2018 17:05
* 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.