Hello,
It depends on where you want to run the code. If you want to run it in the bizform directly, you can alter the bizform web part directly. You can use the OnAfterSave event. Here is an example with a different event:
protected void viewBiz_OnAfterValidate()
{
this.viewBiz.ValidationErrorMessage = "Main error message";
string find = "FirstName";
Control cl = this.viewBiz.BasicForm.FindControl(find);
string toValidate = "";
if (cl != null)
{
TextBox tb = (TextBox)cl;
toValidate = tb.Text.ToString().Trim();
}
}
Please note, that you have to register all the mentioned methods in ihe bizform definition:
<cms:BizForm ID="viewBiz" runat="server" IsLiveSite="true" OnOnAfterValidate="viewBiz_OnAfterValidate" OnOnValidationFailed="viewBiz_OnValidationFailed" />
A different approach would be to handle this in a custom data handler. This can be done as described in our
documentation. Simply check for the data type which is inserted and execute your code. Or you can place your code into a separate page and redirect the visitor to it after they've submitted the form. This can be done in CMSDesk / Tools / Bizforms / General / "Redirect to URL:".
Best regards,
Boris Pocatko