>>var setFormDirty = function (form) { >> var sform = $scope[form]; >> if (sform && sform.editDailyCodesForm) >> sform.editDailyCodesForm.$setDirty(); >> }>Similar, but I actually planned to use variable for the last part of the name (the editDailyCodesForm). I'm going to try it that way, I know I use it for other cases of the properties of an object, just not with the forms.
var form = 'editDailyCodesForm' $scope.form[form]