1

My requirement is to disable the spell checker on Version Comments field while I am publishing the SharePoint page.

I have tried the following:

1) In the page layout wrap your contact field with the following div

<div id="excludeContentFromSpellCheck">
   [FORM FIELD HERE]
   ...
</div>

2) Next step is to add the following JavaScript at the top of your PlaceHolderMain

<script type="text/javascript">
window.onload = function()
{
    var a = document.getElementById('excludeContentFromSpellCheck');

    var b = a.getElementsByTagName('input');
    for (var i = 0; i < b.length; i++)
    {
          b[i].setAttribute("excludeFromSpellCheck", "true");    
    }

    var c= a.getElementsByTagName('textarea');
    for (var i = 0; i < c.length; i++)
    {
          c[i].setAttribute("excludeFromSpellCheck", "true");    
    }
};
</script>

This helps to remove the spell checker on the Contact field perfectly.

But the spell check on the Check In comments is still popping up like this: enter image description here

  • this issue is resolved for me. As there was one more user field on my form, I had to apply the attribute to this field as well. and it worked.! cheers – Ashwini Bhandari May 8 '17 at 11:56

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.