Created
August 22, 2012 17:51
-
-
Save eggsurplus/3427913 to your computer and use it in GitHub Desktop.
Make a field required/not required in edit view of SugarCRM
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
function setFieldRequired(fieldName, req, msgStr){ | |
if(!msgStr){ msgStr = fieldName; } | |
for(var i = 0; i < validate["EditView"].length; i++){ | |
if(validate["EditView"][i][nameIndex] == fieldName) { | |
validate["EditView"][i][msgIndex] = msgStr; | |
validate["EditView"][i][requiredIndex] = req; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now show us the opposite to make a required field not-so.