Simple #JQuery to validate any column or field value in SharePoint:
<script src="/sites/rndsite/Style%20Library/jquery-1.8.1.js" type="text/javascript"> </script>
<script type="text/javascript">
function PreSaveAction() {
alert('hi');// just to debug script , remove while move in production
alert($("select[title='Fieldname']").val()));
if($("select[title='Fieldname']").val() ==' ') {
alert('Serial number field is Empty: Please enter some value');// just to debug script, remove while move in production
return false;
}
}
</script>
No comments:
Post a Comment