Q: how to hide and display a form when I click on button use vuejs help me please, i want when i click the validate button i want to display form 2 and cache form 1, knowing that at the beginning i want to display form 1 and hide form 2, in my code when I click on the validate shows me the form 2 and also the form 1, but I want the form 1 to hide.
form 1:
<div>
<h3>form group 1</h3>
@if ($message = Session::get('success'))
<div class="alert alert-success">
    <p>{{ $message }}</p>
</div>
@endif

 {!! csrf_field() !!}
<div class="form-group">
 <label>Date:</label>
  <input type="date" id="datePicker" name="date" class="form-control" placeholder="date naissance">
 </div>


      Nbre de jour
        
  

    valider
  

form 2
 <div v-if="open">
   <table class="table table-bordered" id="mytable">
        <tr>
            <th>salaire net</th>
            <th>nbre de jour </th>
            <th>prime</th>
        </tr>
        @if($salaries->count())
            @foreach($salaries as $key => $salarie)
                <tr id="tr_{{$salarie->id}}">
                  <td>{{ $salarie->matricule }}</td>
                  <td >{{ $salarie->nom }} {{ $salarie->prenom }}</td>
                  <td><input type="hidden" name="salaire" value="{{ $salarie->salairenet }}">{{ $salarie->salairenet }}</td>
                </tr>
            @endforeach
        @endif
    </table>

    <div class="form-group col-md-offset-5 ">
    <button class="btn btn-success " type="submit" >Pointage mensuel</button>
    </div>
 </div>

code vuejs :
<script src="{{asset('js/Vue.js')}}"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>

<script type="text/javascript">

    var app = new Vue({
        el: '#app',
        data: {
            open: false,

        },
      });
</script>


A: Use v-if and v-else directives.
You are already using v-if="open" in the form 2. Add v-else to the div container of the form 1. Keep in mind that always v-if has to be put before v-else.
You can read more about conditional rendering in the docs: https://v2.vuejs.org/v2/guide/conditional.html
