I don’t know why I am having such a hard time with this - am trying to update a checkbox in db. Have the proper setting to show if it is checked or not appearing on screen but cant get it to update. Also have db setting as Boolean and upload API with a default value of 0 has been added. I have tried so many different way and its driving me nuts - posted code and settings. Can anyone help me with this? Would greatly appreciate it. I thought at first it was a version beta 16 issue but went back to current 5.82 and it does the same.
First of all you don’t need a dynamic value for your checkboxes. A value of 1 you added is what you need.
And also check the following article:
The crucial thing to understand with checkboxes is the value is either sent or not sent. So if the checkbox is NOT checked, NOTHING is posted. If it IS checked, the value is posted.
Even though the form is prepulated for updating?
Okay got it - took off the value and it works leaving the checked attribute on. It was automatically set when prepopulated the form using bootstrap form generator. Thank you guys - really appreciate it.
If you used the Form Generator then there is an issue with Wappler where checkboxes still have Value
instead of Checked
in the dynamic attributes.