mardi 10 novembre 2015

How to read the state of an HTML checkbox in Python / flask

I've built a working web page and python/flask program but cannot figure out how to read the state of a webpage checkbox in the python code. I've figured out how to set a checkbox from python, just not how to read it. Here is the html for one of the checkboxes:

<div class="slideThree">    
    <input type="checkbox" value="None" id="chk_01" name="chk_01" {{chk_01_checked}}/>
    <label for="chk_01"></label>
</div>

The html code is in a separate file from the python program. It looks like I need to use some combination of 'request' or 'get' instructions but cannot find clear examples on how to do it. I'm a novice in both python and html, so any help appreciated.




Aucun commentaire:

Enregistrer un commentaire