首页 > 解决方案 > 禁用人员选取器的拼写检查 - InfoPath 表单

问题描述

您能帮我禁用 InfoPath 表单中的人员选择器字段的拼写检查吗?

我通过了几个代码。但是,这对 InfoPath 表单没有帮助。

请指导我完成这个。

标签: sharepoint-onlineinfopath

解决方案


        $('div').blur(function(){
        debugger;
        setTimeout(function(){
            var HtmlPlaceHolder = document.getElementById('WebPartWPQ2');

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

            var HtmlTextArea= HtmlPlaceHolder.getElementsByTagName('textarea');
            for (var i = 0; i < HtmlTextArea.length; i++)
            {
                HtmlTextArea[i].setAttribute("excludeFromSpellCheck", "true");    
            }
        },2000);
    });

    $('input').blur(function(){
        debugger;
        setTimeout(function(){
            var HtmlPlaceHolder = document.getElementById('WebPartWPQ2');

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

            var HtmlTextArea= HtmlPlaceHolder.getElementsByTagName('textarea');
            for (var i = 0; i < HtmlTextArea.length; i++)
            {
            HtmlTextArea[i].setAttribute("excludeFromSpellCheck", "true");    
            }
        },2000);
    });

        $('textarea').blur(function(){
        debugger;
        setTimeout(function(){
            var HtmlPlaceHolder = document.getElementById('WebPartWPQ2');

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

            var HtmlTextArea= HtmlPlaceHolder.getElementsByTagName('textarea');
            for (var i = 0; i < HtmlTextArea.length; i++)
            {
            HtmlTextArea[i].setAttribute("excludeFromSpellCheck", "true");    
            }
        },2000);
    });

推荐阅读