Monday 25 March 2013

Sharepoint multiline textbox validation


Sharepoint multiline textbox validation


function PreSaveAction()    {

var checkItem = $('#<%=lblTrueFalse.ClientID%>').val();  
         if (checkItem == "true")
         {
var value1=GetV3TextField('Approval Comments');
var Approvalvalue="";
if(navigator.appName == "Microsoft Internet Explorer")
{
Approvalvalue=$(value1).closest("span").find("iframe[Title='Rich Text Editor']").contents().find("body").text();

}
else
{
Approvalvalue=$(value1).val();
}
//var Approvalvalue=$(value1).val();

if(Approvalvalue =='' || Approvalvalue ==null)
{
alert('Please add some comments');
return false;
}
else
{

return true;
}

}
}

1 comment:

  1. Hi Ratikanta,
    How to invoke this functionality on OOB edit form.

    ReplyDelete