i have a very basic form
<input type="checkbox" ng-model="is_active" name="is_active" id="is_active"/>
<select name="node_domain" ng-change="selectAction()" ng-model="node_domain" ng-options="t.pk as t.fields.domain for t in domains"></select>
<input type="hidden" name="domain" id="domain" />
In this form i will use angularJS to add the options select and the checkbox value. The problem is when i send the submit, i don't use an async method, i will send the POST in "normal" mode, like a classic form to my Django view. When i check the request body i will see that domain option send everytime the same value, 0
So, my question is, when i use the select options from angular the form send the POST value like a classic select input? My angular code controller is:
testApp.controller("NodesEditController", function( $scope, Domain , Node, $window ){
$scope.domains = Domain.query();
$scope.selectAction = function() {
console.log($scope.node_domain);
$("#domain").val($scope.node_domain);
};
$scope.nodes_val = Node.get({id:$scope.initval},function(data,headers){
$scope.is_secure = data[0].fields.is_secure;
$scope.is_active = data[0].fields.is_active;
$scope.node_domain = data[0].fields.domain;
});
});