A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

XForm events not firing, despite initialization of event handler.

Vote:
 

I have debugged my XForm-code and can see that this code runs:

 

   public void XForm_ControlSetup(object sender, EventArgs e)
        {

            XFormControl control = (XFormControl)sender;



            control.BeforeLoadingForm += new LoadFormEventHandler(XForm_BeforeLoadingForm);

            control.ControlsCreated += new EventHandler(XForm_ControlsCreated);

            control.BeforeSubmitPostedData += new SaveFormDataEventHandler(XForm_BeforeSubmitPostedData);

            control.AfterSubmitPostedData += new SaveFormDataEventHandler(XForm_AfterSubmitPostedData);

        }

    However, when I click the send-button, the method that is bound to the SaveFormDataEventHandler isn't executed.

Instead the page is loaded again and the XForm_ControlSetup-method, XForm_BeforeSubmitPostedData(object sender, SaveFormDataEventArgs e)-method etc, runs again.

 

How do I solve this?
Thanks!

#62429
Oct 24, 2012 13:34
Vote:
 

Here is the solution:

http://warting.se/2011/05/10/xform-aftersubmitposteddata-is-not-triggered/

"If XForm_AfterSubmitPostedData is never triggered this is probably because the SMTP settings is wrong in web.config(!!?)."

#62437
Edited, Oct 24, 2012 14:57
Vote:
 

you can also check to make sure that you are allowed to submit the form multiple times.  This is done in the xform editor.

#64044
Dec 08, 2012 5:21
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.