0

How can I get the boolean value from the database selected in the chechbox? There are two checkboxes. One of them returns 1 0 and the other true false. How can I get these values ​​selected?

<div class="form-group">
    <label>
        Status
    </label>
    
    <span class="switch">
        <label>
            <input type="checkbox" name="select" id="st">
            
            <span></span>
        </label>
    </span>
</div>

This is my function that returns data to the update modal

$('#nm').val(secilenDeger.Name);
$('#dsc').val(secilenDeger.Description);
$('#grs').val(secilenDeger.DetayImage);

$('#dt').val(secilenDeger.Date);

$('#st').val(secilenDeger.Status);
$('#sh').val(secilenDeger.ShowInHome);

$('#st').val(true) == ':checked';
$('#sh').val(true) == ':checked';
Sercan
  • 3,878
  • 3
  • 12
  • 31
hbaa
  • 17
  • 7
  • Does this answer your question? [How do I check whether a checkbox is checked in jQuery?](https://stackoverflow.com/questions/901712/how-do-i-check-whether-a-checkbox-is-checked-in-jquery) – Amine27 Dec 13 '21 at 12:57

0 Answers0