jeudi 19 février 2015

icheck.js checkbox not working when disabled

I'm upgrading a 10 year old PHP based website to have a modern look and feel, while not breaking the existing code. I dabble at development, but thought if I could download a theme and modify what I need it would work. So far this has worked well, however I've run into a snag when it comes to checkboxes. I'm about 80% complete, so really don't want to start again as the client is expecting this to be completed next week.


On the old site this was the code:



<form action="offers2.php" method="post">
<tr>
<td align="center">Accept New Offers?:</td>
<td><input class="checkbox" type="checkbox" name="acceptOffers" <?php if($user->acceptOffers == 1){ echo "checked"; } ?>><input class="btn" type="submit" name="newOffers" value="Update"></td>
</tr>
</form>


I am using icheck.js, and when it unchecks the box, this works, however when I am check it, it doesn't update.


Any ideas?





Aucun commentaire:

Enregistrer un commentaire