I want to add .val(tag) for checbox and .val(bahasa) for radio for displaying values of it in a Modal bootsrap. But it won't display any values of the selected radio nor checkbox in the Modal popup:( Does anyone know how to do the .val correctly for both radio and checkbox?
Here's my code:
      <script>
            $(document).on("click", "#tombolUbah", function() {
                let id = $(this).data('id');
                let judul = $(this).data('judul');
                let penulis = $(this).data('penulis');
                let tahun = $(this).data('tahun');
                let deskripsi = $(this).data('deskripsi');
                let gambar = $(this).data('gambar');
                let tag = $(this).data('tag');
                let bahasa = $(this).data('bahasa');
                $("#id_buku").val(id);
                    $("#judul_buku").val(judul);
                    $("#penulis_buku").val(penulis);
                    $("#tahun_terbit").val(tahun);
                    $("#deskripsi").val(deskripsi);
                    $("#gambar").val(gambar);
                    $("#tag").val(tag);
                    $("#bahasa").val(bahasa);
            })
        </script>
Thank you so much :)
 
    