Search code examples
sharepointformsblockspam

Sharepoint form-check for spam words and prevent submission


Looking for:

If 'these words' are entered in this text box

Disable the submit button

Otherwise, submit.

This works for empty required fields:

<xsl:if test="@Required='TRUE'">
           <span style="color:#FF0000;font-size:14px;">&#160;*</span>
         </xsl:if>       

But can't seem to make it work to test for unwanted words.


Solution

  • the above code is for displaying * in red color not for disabling the submit button. in case you need to disable the submit button you have to attach javascript to do the same