Skip to main content
Topic: Error with checkbox (Read 2426 times) previous topic - next topic

Error with checkbox

I do not know if it is just me but seems like a bug.

When field is set to Checkbox, database allows null value, record can be inserted with checkbox in unchecked state (database records NULL).
Once inserted, if you go to Edit page and check the checkbox and update record database records set value (same if you check it on Add page).
Then, if  you try to Edit again and uncheck the checkbox and submit, you get mandatory field error and can not update the record.

Basically, if user ever checks the checkbox (by mistake for instance) it can never be unchecked again....


Re: Error with checkbox

Reply #2
Not sure what might break with what I did, but after I changed code in bootstrap-editable.js is seems to work on inline edits on List pages:

Code: [Select]

        submit: function(e) {
            e.stopPropagation();
            e.preventDefault();
           
            //get new value from input
            var newValue = this.input.input2value();
// begin added code
if (newValue == ""){
newValue = null;
};
// end added code