Welcome Guest, Not a member yet? Register   Sign In
form_checkbox doesn't check the box when updating the DB
#3

Also worth checking the return type of the checkbox, depending where the control originated (probably a Bootstrap control). I've had the following values returned from checkboxes (which are often a pain): value could be "on", "checked" etc. whne using Bootsrap. Checkboxes do NOT use 0 as a false value.

Remember with checkboxes, if the value is not set, the return is NOT SET (unassigned - the property does not exist). If it is set (checked) then the value will be set (but could be "on" "checked" etc. Make sure also the value is NOT assigned to the value attribute (... value=1) instead have it as the last param in the list (... name="bob" style="blah" checked> ).
Reply


Messages In This Thread
RE: form_checkbox doesn't check the box when updating the DB - by antidote - 01-20-2020, 05:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB