Sending Form Data to External Database?
Hi everyone,
How do I send form data to an external database of MS SQL? I do not want the form data to go to the Sitefinity database upon submit. Can the forms widget be more expansive in functionality? It seems too limited to only send data to the Sitefinity database. Is anyone else running into this issue? What documentation is available on this topic?
I appreciate any help and guidance that can be offered. Thank you,
Maria
It's actually pretty easy
Create a new class and inherit from the existing forms control
public
class
FormsControlCustom : FormsControl
protected
override
void
InitializeControls(GenericContainer container)
if
(!SystemManager.IsDesignMode)
//Hide the form if JS is disabled, it'll let them bypass the required fields.
base
.InitializeControls(container);
this
.BeforeFormSave +=
new
EventHandler<CancelEventArgs>(FormsControlCustom_BeforeFormSave);