Skip to content

Instantly share code, notes, and snippets.

@hammadbinarif
Last active May 23, 2017 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hammadbinarif/b178db5f36d6fe11ec9c4a881e6e1ed1 to your computer and use it in GitHub Desktop.
Save hammadbinarif/b178db5f36d6fe11ec9c4a881e6e1ed1 to your computer and use it in GitHub Desktop.
_spBodyOnLoadFunctionNames.push("myScriptStartup");
function myScriptStartup () {
var editMode = EditState.Editing;
if (editMode) {
// PDP is in edit mode
// Do things differently here
console.log('PDP is in edit mode. so our input fields will be editable');
}
else {
// make custom input fields read-only
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment