Python Flask WT-Form MultiCheckboxField Demo: Five Guys use checkboxes to choose toppings

preview_player
Показать описание
In this video we modify our previous WT-Forms "Five Guys" example. We convert the MultipleSelectField (that allows the user to make more than one choice -- in this case multiple topping such as ketchup, mustard, and barbeque sauce) into a MultiCheckboxField. Behind the scenes the two approaches have the same effect -- the user passing an array of values which we use the getlist() method to process. We work through the widget import to extend the MultipleSelectField into the MultiCheckboxField.
Рекомендации по теме
Комментарии
Автор

How to set html attriutes to each of the checkbox choices (key and value) (different for each choice)?

BonaFideBOSS