Event on Save button click using JQuery in SharePoint Form(New/EditForm.aspx)
Validation on dropdown value in New/EditForm.aspx before submit the Form using JQuery
<script language=
<script type="text/javascript">
function PreSaveAction()
{
if(($("select[title$='Status']").val()=='Select') && ($("select[title$='Status']").is(':visible')))
{
alert("Required field: "+ $("select[title$='Status']").attr('title'));
return false;
}
return true;
}
</script>
Here PreSaveAction() is the build in function so we need to add our custom code in this function.
<script language=
"javascript"
type=
"text/javascript"
src=
"../../jQuery%20Libraries/jquery-1.4.2.min.js"
></script>
<script type="text/javascript">
function PreSaveAction()
{
if(($("select[title$='Status']").val()=='Select') && ($("select[title$='Status']").is(':visible')))
{
alert("Required field: "+ $("select[title$='Status']").attr('title'));
return false;
}
return true;
}
</script>
Here PreSaveAction() is the build in function so we need to add our custom code in this function.
Hi,
ReplyDeleteI have added a HTML button using Jquery in my default list form(Cannot add using HTML).Now i want to commit changes on that button click.Not able to use __Commit function.
Do you have any idea about that approach???
Thanks
But when i try to do this in save click i am assigning a value to one of the filed which is not get saved
ReplyDelete