I have an article page where I need to do some custom validations in Edit mode(page layout). I tried with PreSaveAction method but I guess it only works for list forms. Any idea how I can validate few conditions before the page is saved or published? Page layout created in HTML mode.

  • Hook into the save button with standard javascript eventlistener – Danny '365CSI' Engelman Jul 2 '16 at 9:35
  • @DannyEngelmanMPW I thought about that. But 'Save' is not the only action button that can submit the page. There is 'Check In' and 'Publish' too. Last resort would be to hook the code on three event listeners. – Thomas Mathew Jul 2 '16 at 9:44
  • Thats most likely your only option, or put the validation on every field – Danny '365CSI' Engelman Jul 2 '16 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.