In my Vue JS code below i wanted to sum input data if box is checked. I set a v-model for each input to post it to API, but i couldn't figure out the way to sum input data if boxed is checked.
Is there a way to do this in Vue Js?
thanks in advance
export default {
data() {
return {
checkPayment: true,
checkPayment2: true,
}
}
<div class="inst-input justify-content-center mt-3">
<input v-model="instFour" class="paid-input" placeholder=" amount-1 " required />
<b-form-checkbox id="checkboxs-2" v-model="checkPayment3" name="checkbox-2" unchecked-value="false">
checked
</b-form-checkbox>
</div>
<div class="inst-input justify-content-center mt-3">
<input v-model="instFive" class="paid-input" placeholder=" amount-2" required />
<b-form-checkbox id="checkbox" v-model="checkPayment4" name="checkbox-1" unchecked-value="false">
checked
</b-form-checkbox>
</div>