Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
sum data using checkbox

below in my Vue JS code, i wanted to sum input data if it's checked in checkbox only, for ex (sum input entered by user instTwo + instThr if they're checked only) and if it's not checked it shouldn't be sum

is there a way in Vue JS to sum data below if it's checked only ?

data() {
        return {
           checkPayment: true,
            checkPayment2: true,
            checkPayment3: true,
            checkPayment4: true,
   
   }},
<p> amount No.1 </p>
  <div class="inst-input justify-content-center mt-3">

 <input v-model="instTwo" class="paid-input"  required />

<b-form-checkbox id="checkboxs-2" v-model="checkPayment" name="checkbox-2" unchecked-value="false">
  
</b-form-checkbox>
</div>

<p> amount No.2 </p>
 <div class="inst-input justify-content-center mt-3">
 <input v-model="instThr" class="paid-input"  required />

 <b-form-checkbox id="checkbox" v-model="checkPayment2" name="checkbox-1" unchecked-value="false">
</b-form-checkbox>
</div>

<p> amount No.3</p>
 <div class="inst-input justify-content-center mt-3">
 <input v-model="instFour" class="paid-input"  required />

 <b-form-checkbox id="checkbox" v-model="checkPayment3" name="checkbox-1" unchecked-value="false">
</b-form-checkbox>
</div>

<p> amount No.4 </p>
 <div class="inst-input justify-content-center mt-3">
 <input v-model="instFive" class="paid-input"  required />

 <b-form-checkbox id="checkbox" v-model="checkPayment4" name="checkbox-1" unchecked-value="false">
</b-form-checkbox>
</div>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!