HTML でチェックボックスを使用し、これらのチェックボックスを Python バックエンドに戻し、ボックスがクリックされると 3 つのカウンターをインクリメントしようとしています。
現在、私の HTML は次のようになり、正常に動作します。
<form method="post">
<input type="checkbox inline" name="adjective" value="entertaining">Entertaining
<input type="checkbox inline" name="adjective" value="informative">Informative
<input type="checkbox inline" name="adjective" value="exceptional">Exceptional
</form>
そして、私のpythonバックエンドには次のものがあります:
def post(self):
adjective = self.request.get('adjective ')
if adjective :
#somehow tell if the entertaining box was checked
#increment entertaining counter
#do the same for the others