hello everyone, i have a little problem with the checkbox, by default the checkbox send 1 if was checked and send 0 if was unchecked, but i send ‘S’ if was checked and ‘N’ if was unchecked and i want to return checked if i send S but returns me unchecked, how i fix that, my checkbox works but when i send ‘S’ checkbox marked as unchecked, this is my code
yeah, i understand your point, actually i tried before and the checkbox return me no marked and if i do that i set only S in the checkbox and if i want to send N?
in controller action, if you set $model->REFERENCIA4=‘S’ checkbox gets checked, if you set $model->REFERENCIA4=‘N’ checkbox will be unchecked. Simple as that.
thanks all, i solved, well, i don’t know if i explain very well, but my checkbox always work, my problem was that the checkbox coming not marked when i checked with S and the problem was a blank spaces that coming in the Data Base so i use trim and that’s it, thanks anyway