Skip to content
Advertisement

HTML Checkbox: automatic checkable prop update based on value with Javascript Jquery

This is my JS file to make the checkboxes, i just want that the checked prop of the checkbox updates itself base on the value of the input because my template engine renders the value of the boolean fields directly to my input value attr.

But is not working

JavaScript

Advertisement

Answer

Solved, main problem was {{item.validate|lower}} returned a “true” “false” string not boolean.

Just need to parse it and go to the most straight fordward solution.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement