jeudi 5 janvier 2017

Bottlepy/Flask - How to set a checkbox?

I am trying to set a checkbox if it is checked in a past template. In other way if the user check the checkbox and click on submit button, he should be able to see what options he has checked. My code is like this:

if request.GET.get('submit', '').strip(): checkbox = request.GET.get('box1') return template('my_template.j2', box1 = checkbox)

How can I do it?




Aucun commentaire:

Enregistrer un commentaire