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

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

Mohammed Siraj

Guest
In Object Definition - Pages - QC Page - Properties -> onsubmit event handler. Configure an onsbumit event handler, which will give you the required callback on form submit. Once the handler returns, validation will be performed. However, in case, you want your handler code to run only in a scenario wherein there are no validation errors. Then you will have run the validation once yourself within the handler and only on success execute handler specific tasks. Example: function onSubmitHandler() { var formDetails = rb.newui.page.PageContext.getFormDetails(rb.newui.util.EDIT_FORM_NAME); if (formDetails) { var validator = formDetails.getKendoValidator(); if (validator && validator.validate()) { //validation true... //run handler tasks here } } }

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