How to make a field required on the edit form. I have this field called "Approver Email" and "approver name". It does not appear on the Default Form since I am using a templet to hide it. I can't set it as required at the site column level because the system will not save the New form without that field completed. is there any way to add code to a script editor to check If those column are empty before saving/submitting it?
Sample demo for
PreSaveAction return false, your form data won't submit, You could add dynamic error information for required field by jQuery.
This answer is not using "Pre Save action" but it might be something to consider.
If you are already creating your own forms and hiding certain fields, you could customise the edit form and set up formatting rules instead. Have a button down the bottom called "submit" or similar, but set up rules so that if your 'required' fields aren't completed, this button is hidden or disabled.
Ensure that you include a message to the user so they know what they've missed and can fix it. You can do that by creating a section in the form with the opposite logic. If [required field] is not blank > Hide this control.
See this post for some ideas / steps to get you started: https://support.office.com/en-us/article/add-custom-help-text-to-a-form-template-cd419f95-0743-42cb-92ac-af5a64f16d82#bm5
It's not code, but it might do what you need.
Hope this helps.