M
Mohammed Siraj
Guest
Right, even a cancel is actually a form submit but with particular request parameter ('act') set to identify 'Cancel' from 'Save'. In the submit handler, you can look for the same parameter, i.e.: var formEl = formDetails.getFormNode(); var action = formEl.find('input[name=act]').val(); if (action && action.toLowerCase() === 'cancel') { //cancel event.stopImmediatePropagation();//stop event propagation, however do not prevent form from submitting.. } else { //save.. this is where your form submit handler should take over.. & do all the custom stuff }
Continue reading...
Continue reading...