<form action="{{ route('sub_instrument.update', ['sub_instrument' => encrypt($sub_instrument->id)]) }}" method="POST" enctype="multipart/form-data">
    @csrf
    @method('PUT')
    <div class="row">
        <div class="col-md-12">

        <div class="form-group">
                <label for="basicInput">Instrument</label>
                    <select class="form-control" name="id_instrument">
                        <option></option>
                        @foreach ($instrument as $item)
                        <option value="{{ $item->id }}" {{ isset($sub_instrument['id_instrument']) ? ($sub_instrument['id_instrument'] == $item->id ? 'selected' : '') : '' }}>{{ $item->instrument }}</option>
                        @endforeach
                    </select>
            </div>
            <div class="form-group">
                <label for="basicInput">Sub Instrument</label>
                <textarea id="w3review" name="sub_instrument" rows="4" class="form-control" placeholder="Sub Instrument">{{ $sub_instrument->sub_instrument }}</textarea>
            </div>

            
            <div class="form-group">
                <label for="basicInput">Jenis Input</label>
                    <select class="form-control" name="id_jenis_input">
                        <option></option>
                        @foreach ($jenis_input as $item)
                        <option value="{{ $item->id }}" {{ isset($sub_instrument['id_jenis_input']) ? ($sub_instrument['id_jenis_input'] == $item->id ? 'selected' : '') : '' }}>{{ $item->jenis_input }} </option>
                        @endforeach
                    </select>
            </div>
        </div>
        
    </div>
  

    <button type="submit" class="btn btn-success">Simpan</button>
</form>
