Posting widget data in IE

Jun 20, 2012 at 7:56 AM

I've created a form widget following this great example:

http://devdirective.com/post/160/how-to-create-custom-forms-in-orchard-cms-with-email-and-recaptcha

But when I post the widget and there is an error on the form, the user gets redirected to a unknown page with the widget form on it, instead of the page the widget was on.

This happens only in IE. Firefox and Chrome (possibly also Opera) use the html5 validation, and post only when the data is valid.

Any ideas on how to get the user back to the page and show the error there ?

 

 

Jul 26, 2012 at 7:07 PM

Hi, i had the same problem. To resolve the issue i wrote a jquery script that makes the form post an async post to the same page (form action). With it you can handle the response and the validation problem without leaving the page.

 

Something like this:

http://slacy.com/blog/2011/03/simple-asynchronous-form-submission-using-jquery/