jeudi 13 septembre 2018

iCheck Reflect Loaded Checkbox

On a blade in my Laravel project I have the following:

<td> 
@if($sD->transfer == 1) 
<input type="checkbox" class="icheckboxTransfer" name="transfer" data-id="" value="1" checked="checked">  
@else 
<input type="checkbox" class="icheckboxTransfer" name="transfer" data-id="" value="1"> 
@endif
</td>

With the first half of the conditional statement, the checkbox is checked, and from the rendered html code, it is correctly set with the checked value on page load.

But, the iCheck checkbox remains empty and unchecked. I can still use it, so I know it is working correctly, but I guess I'm unsure how to get it to load as checked.

Thanks



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2NGL6j2
via IFTTT

Aucun commentaire:

Enregistrer un commentaire