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

213
Views
How to hide and show and element as per input value in vueJs

How to show and hide input as per sibling input value in vue js.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use v-show in the input and pass the sibling v-model value in it to check if it contains value or not.

In below demo, we are showing the input if sibling input have alpha value. You can add condition as per your requirement.

new Vue({
  el: '#app',
  data: {
    input1: null,
    input2: null
  }
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div id="app">
  <input type="text" v-model="input1" placeholder="Input 1"/>
  <input type="text" v-show="input1 === 'alpha'" v-model="input2"  placeholder="Input 2"/>
</div>

about 4 years ago · Juan Pablo Isaza Report
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!