Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

XForm events not firing, despite initialization of event handler.


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?

Oct 24, 2012 13:34

Here is the solution:

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

Edited, Oct 24, 2012 14:57

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

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.