-
Notifications
You must be signed in to change notification settings - Fork 39
Prevent submitting ajax-form in "submitting" state. #54
Comments
I'm not sure I understand why you are doing this. I'm also not sure what this criteria object is.
Now I'm even more confused. Why aren't you just using the native HTML form constraints API? |
The actual content of the The important thing here is that the criteria object is a complex object and couldn't be validated using the form constraints API. My question was that is there any way to abort the AJAX request after the |
Currently, no. But that would be easy to implement. |
This is complete in the 2.0.0 staging branch, and will be released as part of ajax-form v2.0. In order to prevent the form from being submitted, you must invoke the |
IE10+ ignores preventDefault() for custom events. This commit checks for that behavior and ensures defaultPrevented is set for CEs if the browser does not natively do this. closes #54
Hi,
I'm working on form consist of traditional inputs and polymer components and I've found that the easiest way to submit this form is to attach an event handler to ajax-form's
submitting
event and concatenate the object namedcriteria
bound to the polymer elements on the fly. However I want to implement a basic check and if thecriteria
object is empty I'd display a notification to the user and prevent the form from submitting.The code above works like a charm except that the form gets submitted. Any thoughts on how to prevent the form from submitting? Should I do something differently?
The text was updated successfully, but these errors were encountered: