We migrated a site from 2010 Foundation to Online with a list that has multiple enhanced rich text items. Also on the NewForm.aspx is the following script that validates for attachments on the list...

function PreSaveAction()
    var elm = document.getElementById("idAttachmentsTable");
    if (elm == null || elm.rows.length == 0)
        alert("Please attach pictures to proceed");
        return false ;
        return true ;
What we are running into now is the script is called whenever someone tries to enter text in the enhanced rich text fields through dialog box they have to work with - the Save button to post their content to this list.

Is it possible to call this script only when the new list is being finally submitted/saved, and not when folks are editing enhanced rich text fields?

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.