Created
March 24, 2017 11:52
-
-
Save durgesh97025/21aeddc08842684f3b50183abee03f2b to your computer and use it in GitHub Desktop.
Field Disable/Enable for NewForm/EditForm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://msdn.microsoft.com/en-us/library/office/dn600182.aspx#bk_FieldSetShowInNewForm | |
//https://msdn.microsoft.com/en-us/library/office/jj838353.aspx | |
//<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script> | |
//<script> | |
$(document).ready(function(){ | |
var url = "https://unicef.sharepoint.com/teams/DFAM/BudgetSection/_api/web/Lists/getByTitle('XXX')/Fields(guid'XXX')/setShowInNewForm(false)"; | |
$.ajax({ | |
url: url, | |
contentType: "application/json;odata=verbose", | |
type: "POST", | |
headers: { | |
"Accept": "application/json;odata=verbose", | |
"X-RequestDigest": $("#__REQUESTDIGEST").val() | |
}, | |
success: successHandler, | |
error: errorHandler | |
}); | |
function successHandler(data,message,response){ | |
console.log(data); | |
console.log(message); | |
console.log(response); | |
} | |
function errorHandler(a,b,c){ | |
console.log(a); | |
console.log(b); | |
console.log(c); | |
} | |
}); | |
//</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment