I am using iphone style checkbox with below code. It is showing properly and working fine. But when i submit the form it is not sending any value.
<div class = "col-sm-6 col-xs-6" >Gender</div>
<label id="sliderLabel">
<input id="gender" name="gender" ng-model="formData.gender" type="checkbox" />
<span id="slider">
<span id="sliderOn">Male</span>
<span id="sliderOff">Female</span>
<span id="sliderBlock"></span>
</span>
</label>
I am using angular js for client side validation.
Please advise me what am i doing wrong.
Edit:
formApp.controller('formProfile2', function($scope,$http){
$scope.formData = {};
$scope.formprofile2 = function() {
var allData={'formData': $scope.formData, 'uid': uid}
$http({
method : 'POST',
url : 'register.php',
data : allData,
headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
})
If i click on anyone then it is returning the data(true/false) but i need to return false if not clicked.
<form>tag