Function in cam-script

how to call a function inside cam-script by clicking a button on the form using the onclick event

Hi @MarceloCP,

cam-script is an angularjs directive and functions defined inside it’s block would not be visible for pure html onclick attribute.

Because of that I recommend you to use angularjs ng-click directive and define your handler function inside cam-script block as below

$scope.btnDo_onClick = function() {
        $scope.count++;
 }; 

Your html would be like below

<button ng-click="btnDo_onClick()">Do it</button>

If you want to use the pure onclick html attribute then, your function should be defined in another pure script block without cam-script directive