As in the image above, the form contains 10 input field and 10 check boxes.I want to send text box values only when check box is checked. If the value contains value and check box is unchecked , this should skip corresponding text box value. This is my login form code.
<form id="valueForm" ng-submit="saveValues(values,success)">
<div class="small-input list padding" style="padding-top:4px;">
<label class="item item-input">
<input type="text" placeholder="In a word, what is important to you?" ng-model="values.first" ng-change="changeStatus(values.first,success.first)">
<ion-checkbox ng-model="success.first" ng-true-value="true" ng-false-value="true" ng-checked="checked" ng-disabled="!values.first" style="border: none;padding-left: 30px;" class="checkbox-royal"></ion-checkbox>
</label>
<label class="item item-input" ng-show="success.first" ng-class="{'animated-custom slideInLeft':success.first}">
<input type="text" placeholder="What else is important to you?" ng-model="values.second" >
<ion-checkbox class="checkbox-royal" ng-model="success.second" ng-false-value="true" ng-disabled="!values.second" style="border: none;padding-left: 30px;"></ion-checkbox>
</label>
<label class="item item-input" ng-show="success.second" ng-class="{'animated-custom slideInLeft':success.second}">
<input type="text" placeholder="What else is important to you?" ng-model="values.third">
<ion-checkbox class="checkbox-royal" ng-model="success.third" ng-false-value="true" ng-disabled="!values.third" style="border: none;padding-left: 30px;"></ion-checkbox>
</label>
<label class="item item-input" ng-show="success.third" ng-class="{'animated-custom slideInLeft':success.third}">
<input type="text" placeholder="What else is important to you?" ng-model="values.four">
<ion-checkbox class="checkbox-royal" ng-model="success.four" ng-false-value="true" ng-disabled="!values.four" style="border: none;padding-left: 30px;"></ion-checkbox>
</label>
<label class="item item-input" ng-show="success.four" ng-class="{'animated-custom slideInLeft':success.four}">
<input type="text" placeholder="What else is important to you?" ng-model="values.five">
<ion-checkbox class="checkbox-royal" ng-model="success.five" ng-false-value="true" ng-disabled="!values.five" style="border: none;padding-left: 30px;"></ion-checkbox>
</label>
<label class="item item-input" ng-show="success.five" ng-class="{'animated-custom slideInLeft':success.five}">
<input type="text" placeholder="What else is important to you?" ng-model="values.six">
<ion-checkbox class="checkbox-royal" ng-model="success.six" ng-false-value="true"ng-disabled="!values.six" style="border: none;padding-left: 30px;"></ion-checkbox>
</label>
<label class="item item-input" ng-show="success.six" ng-class="{'animated-custom slideInLeft':success.six}">
<input type="text" placeholder="What else is important to you?" ng-model="values.seven">
<ion-checkbox class="checkbox-royal" ng-false-value="true" ng-model="success.seven" style="border: none;padding-left: 30px;"></ion-checkbox>
</label>
<label class="item item-input" ng-show="success.seven" ng-class="{'animated-custom slideInLeft':success.seven}">
<input type="text" placeholder="What else is important to you?" ng-model="values.eight">
<ion-checkbox class="checkbox-royal" ng-model="success.eight" ng-false-value="true" style="border: none;padding-left: 30px;"></ion-checkbox>
</label>
<label class="item item-input" ng-show="success.eight" ng-class="{'animated-custom slideInLeft':success.eight}">
<input type="text" placeholder="What else is important to you?" ng-model="values.nine">
<ion-checkbox class="checkbox-royal" ng-false-value="true" ng-model="success.nine" style="border: none;padding-left: 30px;"></ion-checkbox>
</label>
<label class="item item-input" ng-show="success.nine" ng-class="{'animated-custom slideInLeft':success.nine}">
<input type="text" placeholder="What else is important to you?" ng-model="values.ten">
<ion-checkbox class="checkbox-royal" ng-model="success.ten" style="border: none;padding-left: 30px;"></ion-checkbox>
</label>
<button type="submit" ng-show="success.first" class="button button-dark button-shadow pull-right" style="" ><i class="ion-ios-arrow-forward"></i></button>
</div>
</form>
