vendredi 25 février 2022

Show a specific data from jinja2 according to a checkbox is checked or not

I have a specific select that I would change the options according to with a checkbox that is either checked or not. This select is inside another Jinja2 loop, like below:

    

So far, I've created a variable called variable_to_check in the javascript, but the jinja2 does not seem to get the value of this variable:

variable_to_check == 0
function libera() {
    let check = document.getElementById('libera_check')

    
    if (check.checked) {

    var_libera_todas_agencias = 1
    
 
    
} else {
            
    var_libera_todas_agencias = 0
    
}


}



Aucun commentaire:

Enregistrer un commentaire