mardi 14 janvier 2020

show different dropdown list from a checkbox selection

I just started to learn to use Flask to build an app. Right now I am stuck at point. I passed 2 different lists as 2 variables to my HTML template from my Flask function. In HTML, I have a checklist and based on if the option is "checked", a dropdown function will show different list1 or list2.

list1, list2

<div class="form-group">
    <label class="switch">Multi-index Rows
        <input type="checkbox" name="Multiindexrow" id="Multiindexrow">
            <span class="slider round"></span>
    </label>
</div>

<div class="form-group">
    <label>Select Your header</label>
    <select name="option" width="500px" id="answer">
     
    </select>
</div>



Aucun commentaire:

Enregistrer un commentaire