Forum Post: New Ui - How To Intercept Form Submission (quick Create) ?

  • Thread starter Thread starter Meryk
  • Start date Start date
Status
Not open for further replies.
M

Meryk

Guest
Hello, I have something to achieve and would need some help please : I am in a Quick Create page, and I want to operate some things on click on Save (before saving of course). But I want to do that only when all the required fields are filled in, and there are no errors on that page that could block the save. The reason I need this, is because I am opening another window from the Quick Create on click on Save, but from this window I don't want to come back to the quick create but finish the creation and go back to the list page. This is what I am doing now : var kendoSave = $("input.k-primary[value='Save']"); kendoSave.kendoButton({ click: onClick }); function onClick(e){ // my code .. } But with this, "my code" is running before all the required fields are checked, which is forcing me to come back to quick create in the case those fields are still empty. Also, if all the required fields are filled in properly, when I click Save, "my code " is not running at all, and the save is done normally and the Quick create page closed, ignoring the onClick.. Is there any other event rather than click to do that please? Thanks Meryem

Continue reading...
 
Status
Not open for further replies.
Back
Top