I have a requirment to redirct the Save button in a form that enters information into a sharepoint 2013 list.
I have managed to redirect the cancel button with J Query;-
<script src="/_catalogs/masterpage/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('input[value=Cancel]').click(function() { window.location.replace("https://MYURL.com/Pages/PhoneNumbers.aspx?k=#k=*");});
});
</script>
If I use the above code for my "Save" button it runs the validation and redirects to the new page but if I leave a mandatory field blank it flashes up the red text below the input box to show it musn't be left blank then redirects I want it to stay on the page if a field is left blank.