                 form.setErrors(data)
 
         saveNewValue = (target) ->
-            form = target.parents("form").checksley()
+            formEl = target.parents("form")
+            form = formEl.checksley()
             return if not form.validate()
 
             $scope.newValue.project = $scope.project.id


        cancel = (target) ->
            row = target.parents(".row.table-main")
            value = target.scope().value
            $scope.$apply ->
                row.addClass("hidden")
                value.revert()

        $el.on "click", ".delete-value", (event) ->
            event.preventDefault()
            target = angular.element(event.currentTarget)
            formEl = target.parents("form")
            value = formEl.scope().value

            choices = {}
            _.each $scope.values, (option) ->
                if value.id != option.id
